Both are used to save data among tasks.
1. COMMAREA is private to that transaction only . Like every transaction has its own COMMAREA created by CICS as soon as the transaction is initiated .
TSQ , if queue id is known can be accessed by other transactions also
2. COMMAREA length is s9(4) comp i.e. 65k . TSQ can have any length.
3. COMMAREA is available only during the transaction is running.
TSQ if created with auxiliary option resides in aux memory and available even if main memory crashes.
4.COMMAREA is used to transfer data from one task to another while TSQ is used widely within the task as a scratch pad.
Ways to initiate a CICS Transaction
A. Keying in the Transaction-id at the terminal
B. By coding an EXEC CICS START in the application program
C. By coding the transaction id and trigger level in the DCT (Automatic Task Initiation)
D. By coding the transaction id in the EXEC CICS return command
E. By associating the attention key with the PCT
F. By embedding the transaction id in the first four positions of a screen sent to the terminal
G. By using the Program List Table.
B. By coding an EXEC CICS START in the application program
C. By coding the transaction id and trigger level in the DCT (Automatic Task Initiation)
D. By coding the transaction id in the EXEC CICS return command
E. By associating the attention key with the PCT
F. By embedding the transaction id in the first four positions of a screen sent to the terminal
G. By using the Program List Table.
Cursor Positioning in CICS
Static Cursor Positioning : When defining the map field DFHMDF macro in the attribute parameter IC is coded, the cursor will be positioned in that field. This method of cursor positioning is called static cursor positioning.
Relative Positioning : Code the CURSOR option with a value relative to zero.
Symbolic Positioning : Move high values or 1 to the field length in the symbolic map and code CURSOR on the SEND command.
Relative Positioning : Code the CURSOR option with a value relative to zero.
Symbolic Positioning : Move high values or 1 to the field length in the symbolic map and code CURSOR on the SEND command.
Pseudo-conversation and CICS Programs
Programming methodology in which the task will not wait for the terminal users response, but frees and resources after sending the message is call a PSEDUDO Conversations.
Terminating the task every time the application needs a response from the user and then starting the next transaction when the user presses a attention key is PSEUDO Conversational Processing.
Terminating the task every time the application needs a response from the user and then starting the next transaction when the user presses a attention key is PSEUDO Conversational Processing.
LINK and XCTL
The LINK command expects return of control to the calling program, but the XCTL command does not.Return to the calling program will be the result of the CICS RETURN command, specifying TRANSID(name of the calling program).
Link is temporary transfer of control
XCTL is permanent transfer of control
Link is temporary transfer of control
XCTL is permanent transfer of control
AEIV
In CICS , If length of the source data is more than the receiving field, This error will occur.
COBOL DB2 COMPILE JCL
//COMPDB2 (XXX,XXX),'COMPILE JCL',
// CLASS=A,MSGCLASS=A,NOTIFY=&SYSUID
//********************************************************************
//* COMPILATION, LINK EDIT AND THE BIND STEP FOR A COBOL DB2 PROGRAM *
//* WILL BE DONE BY SUBMITTING THIS JOB. *
//* THE DB2 REGIONS AND CORRESPONDING PARAMETERS NEEDS TO BE CHANGED *
//* WITH RESPECT TO THE PROGRAM *
//********************************************************************
//* PRECOMPILE DB2 PROGRAM *
//*-------------- LOCATION OF DBRM LIBRARY -------------------------*
//********************************************************************
//PC EXEC PGM=DSNHPC,
// PARM='HOST(COB2),APOST,SOURCE',
// REGION=4096K
//DBRMLIB DD DISP=SHR,
// DSN=DEV.SURESH.DBRM(DB2PROG) <------------------------ (1)
//STEPLIB DD DISP=SHR,
// DSN=SYSX.DB2.XXX.XXXXX
//********************************************************************
//*SYSIN -----------INPUT COBOL DB2 PROGRAM LOCATION-----------------*
//********************************************************************
//SYSIN DD DISP=SHR,
// DSN=DEV.SURESH.SRC(DB2PROG) <---------------------- (2)
//SYSCIN DD DISP=(MOD,PASS),
// DSN=&&TEMP,
// SPACE=(800,(500,500)),
// UNIT=SYSDA
//********************************************************************
//* DCLGEN MEMBER LOCATION *
//*SYSLIB-----------------INPUT SOURCE LIBRARY FOR SQL---------------*
//********************************************************************
//SYSLIB DD DISP=SHR,
// DSN=DEV.SURESH.DCL <---------------------- (3)
// DD DISP=SHR,
// DSN=DEV.SURESH.CPY
//SYSPRINT DD SYSOUT=T
//SYSTERM DD SYSOUT=T
//SYSUDUMP DD SYSOUT=*
//SYSUT1 DD SPACE=(800,(500,500),,,ROUND),
// UNIT=SYSDA
//SYSUT2 DD SPACE=(800,(500,500),,,ROUND),
// UNIT=SYSDA
//*
//********************************************************************
//* COMPILATION *
//********************************************************************
//*
//COB EXEC PGM=IGYCRCTL,
// COND=(4,LT,PC),
// PARM=('SIZE(4000K),BUFSIZE(32760),LIST,LIB,MAP,OBJECT',
// 'DATA(31),XREF,RENT'),
// REGION=4M
//STEPLIB DD DISP=SHR,
// DSN=XXXX.XXXXXX
//SYSIN DD DISP=(OLD,DELETE),
// DSN=&&TEMP
//SYSLIN DD DISP=(MOD,PASS),
// DSN=&&LOADTMP,
// SPACE=(800,(500,500)),
// UNIT=SYSDA
//********************************************************************
//*--------------SOURCE LIBRARIES FOR COBOL DB2 CODE (COPY LIBRARIES)*
//********************************************************************
//SYSLIB DD DISP=SHR,
// DSN=DEV.SURESH.DCL <----------------- (4)
// DD DSN=DEV.SURESH.CPY,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSUT1 DD SPACE=(800,(500,500),,,ROUND),
// UNIT=SYSDA
//SYSUT2 DD SPACE=(800,(500,500),,,ROUND),
// UNIT=SYSDA
//SYSUT3 DD SPACE=(800,(500,500),,,ROUND),
// UNIT=SYSDA
//SYSUT4 DD SPACE=(800,(500,500),,,ROUND),
// UNIT=SYSDA
//SYSUT5 DD SPACE=(800,(500,500),,,ROUND),
// UNIT=SYSDA
//SYSUT6 DD SPACE=(800,(500,500),,,ROUND),
// UNIT=SYSDA
//SYSUT7 DD SPACE=(800,(500,500),,,ROUND),
// UNIT=SYSDA
//*
//*
//********************************************************************
//* LINK EDIT *
//********************************************************************
//*
//LKED EXEC PGM=IEWL,
// COND=((4,LT,COB),(4,LT,PC)),
// PARM='XREF'
//SYSLIB DD DISP=SHR,
// DSN=SXXX.SXXXXXXX
// DD DISP=SHR,
// DSN=XXXX.DB2.XXX.XXXXLOAD
// DD DISP=SHR,
// DSN=SYS1.VSCLLIB
//SYSLIN DD DISP=(OLD,DELETE),
// DSN=&&LOADTMP
//* DD DDNAME=SYSIN
//********************************************************************
//*----------------LOCATION OF LOAD LIBRARY--------------------------*
//SYSLMOD DD DISP=SHR,
// DSN=DEV.SURESH.LOADLIB(DB2PROG) <------------ (5)
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSUT1 DD SPACE=(1024,(50,50)),
// UNIT=SYSDA
//*
//********************************************************************
//* BIND - BIND THE DB2 PACKAGE *
//********************************************************************
//BIND EXEC PGM=IKJEFT01,
// COND=(4,LT),
// REGION=4096K
//STEPLIB DD DISP=SHR,
// DSN=XXX4.DB2.XXXX.XXXXLOAD
//DBRMLIB DD DISP=SHR,
// DSN=DEV.SURESH.DBRM(DB2PROG) <--------------- (6)
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM (DEVDB )
BIND MEMBER (DB2PROG) -
PACKAGE (PACKG11) -
LIBRARY ('DEV.SURESH.DBRM') - <---------------- (7)
ACTION (REP) -
ISOLATION (CS) -
VALIDATE (BIND)-
RELEASE (COMMIT) -
OWNER (SURESH) -
QUALIFIER (DEVQUALI)
END
/*
**************************** Bottom of Data ****************************
(1) - When we precompiled, precompiler will create the DBRM, it will
be placed in the pds specified here.
(2) - Location of COBOL-DB2 program
(3) - Needs to speficiy DCLGEN member locations
(4) - Needs to specify DCLGEN and COPYBOOK locations here
(5) - Load module location, load module will be created here. this
location needs to be given in run jcl.
(5) & (6) - specify the location of DBRM, ( same location used in step1 ).
COBOL DB2 RUN JCL
//RunJCL JOB (xxx,YYYY),
// 'SELECT EMPLOYEE',
// CLASS=X,
// MSGCLASS=B,
// NOTIFY=&SYSUID,
// REGION=0K
//*
//**********************************************************************
//* mainframegurukul.COM - DB2 COBOL RUN JCL *
//**********************************************************************
//*
//STEP01 EXEC PGM=IKJEFT01,
// DYNAMNBR=20
//*
//STEPLIB DD DISP=SHR,
// DSN=SYSL.DB2.DEV.XXXXLOAD
// DD DISP=SHR,
// DSN=SYSL.DB2.DEV.XXXXYYYY
//*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DEVDB)
RUN PROGRAM(DB2PROG) - <------- (1)
PLAN(PLAN11111) - <------- (2)
LIBRARY('DEV.SURESH.LOADLIB') <------- (3)
END
/*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
//*
(1) - Program name, which needs to be executed.
(2) - Plan name, corresponding plan name for the package that we
have used in compile jcl.
(3) - Program load module created in compile jcl. (refer point 5, in compile jcl )
Specify dummy VSAM dataset in a JCL
Code AMP=’AMORG’ . This parameter tells the OS to treat the file as VSAM file.
//NOVSAMIO DD DUMMY,AMP=’AMORG’
//NOVSAMIO DD DUMMY,AMP=’AMORG’
INPUT /OUTPUT PROCEDURE with SORT
We RELEASE record-name (for INPUT PROCEDURE) and
We RETURN file-name (for OUTPUT PROCEDURE)
We RETURN file-name (for OUTPUT PROCEDURE)
How COBOL Compiler finds a dataset as VSAM dataset
When the ORGANIZATION clause is coded for a file, the COBOL compiler interprets it as a
VSAM dataset
VSAM dataset
"system symbol" for which the system substitutes your TSO ID
&SYSUID is a "system symbol" for which the system substitutes your TSO ID.
The only system symbol that can be used in a batch job, and can be useful when more than one
individual submits the same JCL.
The only system symbol that can be used in a batch job, and can be useful when more than one
individual submits the same JCL.
Delete a member in a PDS, when someone is using it
//DELMEMB EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//PDS DD DSN=libraryname,DISP=SHR
//SYSIN DD *
ALLOC DDN(INFILE) SHR REUSE DSN('libraryname ')
DELETE libraryname(membername) FILE(PDS)
//SYSPRINT DD SYSOUT=*
//PDS DD DSN=libraryname,DISP=SHR
//SYSIN DD *
ALLOC DDN(INFILE) SHR REUSE DSN('libraryname ')
DELETE libraryname(membername) FILE(PDS)
Max limit of TIME parameter
TIME=MAXIMUM will allow the job to run for 357912 minutes (248.55 days)
TIME=NOLIMIT will allow the job for unlimited amount of time
TIME=NOLIMIT will allow the job for unlimited amount of time
Specify dummy VSAM dataset in a JCL
Code AMP=’AMORG’ . This parameter tells the OS to treat the file as VSAM file.
//NOVSAMIO DD DUMMY,AMP=’AMORG’
//NOVSAMIO DD DUMMY,AMP=’AMORG’
Why JCL has ‘//’ in col 1& 2 in each Statement
The Slashes date back from when PUNCHED CARDS were used to submit JCL code for execution. If the cards were mistakenly put back to front in the reader, the slashes wouldn’t be read first and so the card deck could be rejected. So ‘//’ ensures that the punched cards are placed properly
Why null statement
Back when punched cards were used, a null coded on distinctive colored cards was used to help
operators separate card decks. ( Hence , it helped to identify the end-of-job card, and the start of
next job for the operators)
operators separate card decks. ( Hence , it helped to identify the end-of-job card, and the start of
next job for the operators)
How much data can TAPE store?
A typical tape reel might contain 170 MB whereas tape cartridges can contain as much as 10GB.
To delete a dataset that is protected
//STEP1 EXEC PGM=EXEC
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE TOP.SECRET.DATA -
PURGE
/*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE TOP.SECRET.DATA -
PURGE
/*
Subscribe to:
Posts (Atom)