You are on page 1of 15

1.

RETENTION PERIOD FOR DIFFERENT MANAGEMENT CLASS


MGMTCLAS Dataset Retention (mcname) Type -----------------------------------------------------------------GDGA GDG Retained (370) days -----------------------------------------------------------------GDGLIM GDG Retained (2555) days -----------------------------------------------------------------GDGM GDG Retained (35) days -----------------------------------------------------------------GDGQ GDG Retained (95) days -----------------------------------------------------------------GDGS GDG Retained (185) days -----------------------------------------------------------------GDGT GDG Retained (15) days -----------------------------------------------------------------GDGW GDG Retained (8) days -----------------------------------------------------------------An example of the JCL is as follows: //ddname // // // DD DSN=dsname, DISP=(xxx,yyy,zzz), MGMTCLAS=mcname, RECFM=aa,LRECL=bb

2. HOW TO KNOW WHICH LPAR YOU ARE IN? Entering SYSNAME in any ispf command prompt will permanently show the system you are in at the left most top of the screen. To turn off use SYSNAME OFF.
3. PERFORMANCE CONSIDERATIONS OF VARIOUS USUAGE CLAUSES

DISPLAY compared to packed decimal (COMP-3) Using 1 to 6 digits: DISPLAY is 100% slower than packed decimal Using 7 to 16 digits: DISPLAY is 40% to 70% slower than packed decimal Using 17 to 18 digits: DISPLAY is 150% to 200% slower than packed decimal Packed decimal (COMP-3) compared to binary (COMP or COMP-4) with TRUNC(STD) compiler option Using 1 to 9 digits: packed decimal is 30% to 60% slower than binary Using 10 to 17 digits: packed decimal is 55% to 65% faster than binary Using 18 digits: packed decimal is 74% faster than binary

General TCS Public

4. GETTING AVERAGE RECORD SIZE OF VB FILE

It is very important to get the Average Record Size correct for Variable length file. Otherwise you may either overestimate or under estimates the size If you are not sure about the Average Record Length use the following JCL and look into to the TOOLMSG DD to get Average record Length.

//PSTY0000 EXEC PGM=ICETOOL, // COND=(0,NE) //TOOLMSG DD SYSOUT=* //DFSMSG DD SYSOUT=* //IN2 DD DSN=SSTM00P.GB.BSTM0600.PRMBKUP(0),DISP=SHR //TOOLIN DD * STATS FROM(IN2) ON(VLEN) VSAMTYPE(V) /* To get the Average record length look at the TOOLMSG output

5.

DIFFERENCE BETWEEN UMDTTEMP and UMDTDATA

UMDTTEMP:- A temp file which is used to store on-line datatable's data and will be deleted during daily CICS recycle regardless of every module private deletion logic. UMDTDATA:- Is also a temp file, but in this a time stamp is added into it. Monitoring process will monitor the time stamp and if the data is more than 2 Hrs OLD the data will be deleted automatically. Currently rewards migrated their DT23, DT54 and DT55 data tables build from UMDTTEMP to UMDTDATA 6.
General TCS Public STEPLIB

We know that JOBLIB statement must be placed after the JOB statement and before the first EXEC statement in the job. But, the STEPLIB statement can be placed anywhere in the particular steps JCL (not necessarily the first DD statement in the STEP.

7.

SIGN CLAUSE CONVERSION IN COBOL

Below are the sign clause substitutions in COBOL +1=A +2=B +3=C +4=D +5=E +6=F +7=G +8=H +9=I -0=} -1= J -2= K -3=L -4=M -5=N -6=O -7=P -8=Q -9=R Example: Number -125 +125
General TCS Public

TRAILING SIGN (Default) 12N 12E

8.

REPLACE OR REMOVE STRINGS ANYWHERE USING DFSORT

The FINDREP feature of INREC, OUTREC and OUTFIL makes it easy to find and replace strings anywhere within your records. Here's an example of a DFSORT job that will replace 'Max' with 'Maximum' and 'Min' with 'Minimum': //S1 EXEC PGM=DFSORT //SYSOUT DD SYSOUT=_ //SORTIN DD _ San Jose - Max = 5421,Min = 23 Los Angeles - Max = 172,Min = 3213 Albany - Max =1832,Min = 165 /* //SORTOUT DD SYSOUT=_ //SYSIN DD _ OPTION COPY INREC FINDREP=(INOUT=(C'Max',C'Maximum',C'Min',C'Minimum')) //* SORTOUT would have these records: San Jose - Maximum = 5421, Minimum = 23 Los Angeles - Maximum = 172, Minimum = 3213 Albany - Maximum = 1832, Minimum = 165

9.

Why mandatorily define File status variable for VSAM in each COBOL module?

While using VSAM file in COBOL program the file status had to be handled for each step, that is check for the file-status every time we use the file for any operation, because irrespective of the file-status the COBOL program will end with RC=0. That is, even if the write/read/delete operation fails on a VSAM the COBOL program will continue with no error, which is wrong. This has to be handled by checking for the VSAM file-status code for every operation on a file. This is an important issue in VSAM.
10. NUMERIC CHECK IN DFSORT

In order to avoid potential SOC7's we usually do a NUMERIC check in COBOL module. This check can also be done using DFSORT. Here is the example INCLUDE COND=(1,6,FS,EQ,NUM)

General TCS Public

FS format does a character numeric test; each byte of the specified field is checked for '0' through '9' (X'F0'-X'F9'). EQ,NUM tests for numerics. NE,NUM tests for nonnumeric. If the input data is like below ABCDEF A01CD$ 012345 222222 AA AA1 The output will be 012345 222222 Similar to above we can perform numeric checks to ZD and PD data also. For example, if you wanted to omit records with nonnumeric ZD values in positions 21-28, you could use this OMIT statement: OMIT COND=(21,8,ZD,NE,NUM) If you wanted to include records with numeric PD values in positions 11-15, you could use INCLUDE=(11,5,PD,EQ,NUM)

11.

THUMB RULE for SEARCH and SEARCH ALL

For a table with less than 50 entries, go for SEARCH (Sequential Search) For a table with more than 50 entries go for SEARCH ALL (Binary Search) 12.
Can you SAVE DFSORT ?

In SORT when might encounter a situation to copy the input records to File1 if it matches some criteria and the rest of the records to the File2. We usually do this by using INCLUDE COND for File 1 and OMIT COND COND for FILE2. Alternatively we can use SAVE keyword which will copy the remaining records. e.g
General TCS Public

Legacy way SORT FIELDS=COPY OUTFIL FILES=1,INCLUDE=(10,2,CH,EQ,C'34') OUTFIL FILES=2,OMIT=(10,2,CH,EQ,C'34') New way SORT FIELDS=COPY OUTFIL FILES=1,INCLUDE=(10,2,CH,EQ,C'34') OUTFIL FILES=2,SAVE
13. SAVING A CERTAIN SEQUENCE OF COMMANDS

The commands you use regularly can be saved as a function key. For example if you often change a JCL, save it , submit it and then go to the job spool, you could save a PF key as SAVE;SUB,=IOF. To do this , type KEYS on command line and make the necessary entries.

14.

Why READ FILE and WRITE RECORD?

You READ FILE because you dont know in advance 1) Whether there actually a record to read or not. 2) For variable or undefined length files, how long the next record will be if there is one. You WRITE RECORD because you know in advance the answer to both of the above questions.
15. MEANING OF DEVICE NAME IN SELECT CLAUSE

SELECT INFILE ASSIGN TO UT-S-INFILE OR SELECT INFILE ASSIGN TO DA-S-INFILE What they mean actually is
General TCS Public

First Part in DDNAME: Device Class UT stands for utility (Tape or sequential disk) DA stands for direct access (Disk) Second Part in DDNAME: Method of Organization S Sequential (Printer, Terminal, Disk or Tape) I, R, D Disk files to be accessed randomly
16. COLOURING ISPF

Entering 'COLOR' in any ISPF command prompt will allow you to change system's default ISPF color in a easy way.
17. HIDING HIDDED MESSAGES

Usually we will see the message like "n Line(s) not Displayed" when we use 'X' or 'ONLY' commands . We can remove the message by entering HIDE X as a primary command or in an edit macro. HIDE removes the excluded lines messages from the display and indicates the location of each block of excluded lines by underscoring the line number field of the previous line. The RESET HIDE primary command and edit macro command restores the lines containing the "n Line(s) not Displayed" message to the display.

18.

JOB WITHOUT JOB CARD

Without job card the job can be run, it will ask for job name characters with which it will run the job but the spool output will be listed somewhere
19. VIEW PAGE BREAK IN PS FILE

To see the page break in the report open the report in the VIEW mode, then in the first cols if it has 0, it is in the same page else if it has value 1, then it is new page 20.
General TCS Public

VIEW REQUIRED FIELDS

Say for e.g The output file has 200 fields and i need to verify only the 25th and 175th fields only I am using FILE-AIDs VFMT mode and for each record I am scrolling between 25 th and 175th field. Is there any efficient way to handle this situation? In the VFMT mode, issue DISPLAY 25 175 ONLY . Only 25th and 175th fields will be displayed.
21. TIME DIFFERENCE

What is the difference between getting the system time with EIBTIME and ASKTIME command in CICS? ASKTIME = requests the current date and time EIBTIME = field have the value at the task initiation time
22. EMPTY FILE CHECK

To check whether the file is empty or not, The coding is as follows:

use IDCAMS

//STEP1EXEC PGM=IDCAMS //DD1 DD DSN=....Input file (to be checked) ... VSAM / PS //DD2 DD SYSOUT=* //SYSPRINT DD SYSOUT=* //SYSABEND DD SYSOUT=* //SYSIN DD * REPRO INFILE(DD1) OUTFILE(DD2) SKIP(1) COUNT(0) // If the return code is 12 then the file is empty else the RC will be 0 which means the files have records in it.

23.

MIPS saving TIP

INITIALIZE verb in COBOL is one of the most CPU consuming verb. Try to Avoid INITIALIZE verb in any coding. If you want to initialize a copybook or a group variable like below e.g , please follow the below tip which will save lots of MIPS.

01 INTERM-REC. 05 INERM-PART1 05 INERM-PART2 General TCS Public

PIC X(02). PIC S9(07) COMP-3.

05 05 05 05 05 05

INERM-PART3 INERM-PART4 INERM-PART5 INERM-PART6 INERM-PART7 INERM-PART8

PIC X(40). PIC X(10). PIC S9(04) COMP. PIC X(02). PIC 9(10). PIC X(02). PIC X(72).

01 INTERM-REC-INIT

To initialize this INTERM-REC for each input record, initialize the record once and move to INTERM-REC-INIT. Then, for each input record, move INERM-REC-INIT to INTERM-REC. 24. When you get the Mapfail condition in CICS? What is the abend code of it?

When we try to receive map without entering the data in to it. AEI9. This can be avoided by using FSET
25. What is MDT? In how many ways it can be Set or Reset?

Modified data Tag. It is a last bit of the attribute byte to identifies by the system whether the user has entered the data or not. MDT will be on 1 when user enters the data. MDT will be off 0 when user does not enter the data. By using FSET we can make MDT to 1. By using FRSET we can make MDT to 0. 26.
How can I find the last 10 datasets that I have accessed ?

1.GO TO ISPF 3.4 option. 2. On the top, there is a MENUBAR. Select REFLIST 3. Select Option 1 in it. Using this option you can find out the last 30 datasets that you have accessed....

27. Alternate to SuperCE Option(3.13) is to use the macro COMPARE .


Use this when you there is less difference between the two files. 1.Open a DSN in EDIT or VIEW Mode 2. On the Command line , issue COMP 'YOUR.SECOND.COMPARISON.DSN' 3. If you want only the changes to be listed, issue COMP 'YOUR.SECOND.COMPARISON.DSN' EXC

28.

Sorting Data Between Headers and Trailers

General TCS Public

Often we come across a situation to sort a file that is having Headers and trailers. For that we usually do two pass sort to achieve the results else the headers and trailers won't assemble in their right order.(It may go to bottom or top). Icetool now have cool feature called DATASORT which can be used to achieve this. The new DATASORT operator of DFSORTs ICETOOL lets you sort the data records between header and trailer records while keeping the header and trailer records in place. You define the first n records as header records and/or the last n records as trailer records, provide the SORT statement you want to use for your data records, and DATASORT does the rest. FROM(indd): indd is the ddname of the input data set. TO(outdd): outdd is the ddname of the output data set. HEADER(n) or FIRST(n): The first n records are header records. HEADER or FIRST can be used for one header record. TRAILER(n) or LAST(n): The last n records are trailer records. TRAILER or LAST can be used for one trailer record. USING(xxxx): xxxxCNTL is the ddname of the data set containing the SORT statement, and optionally other DFSORT statements, to be used for the DATASORT operation. E.G //FILE1 DD * 2010-FEB-09 2000 5000 3000 1000 COUNT=4 TOTAL=11000 //FILE2 DD SYSOUT=*

//TOOLIN DD * DATASORT FROM(FILE1) TO(FILE2) HEADER(1) TRAILER(2) USING(CTL1) //CTL1CNTL DD * SORT FIELDS=(1,4,CH,A) /* // Output: 2010-FEB-09 1000 2000 3000 5000 COUNT=4 TOTAL=11000 29. DB2 COLOUM LENGTH CHANGE

General TCS Public

If we want to change a copybook field length from X to Y( e.g 9(6) to 9(10)), it will be easy in QSAM,VSAM and other field structures.( Of course requires recompiles, one-time etc) But in DB2 we can't change the field length unless if we want to change datatype as VARCHAR. The only solution is DROP the TABLE and RECREATE it and reload all the data (Most people think that we can use ALTER to change, but it is not)

30.

How to find the current version of DB2 being used ? in DB2 COMMANDS

Type -DISPLAY GROUP

LVL(810) indicates version 8.1 LVL(710) indicates version 7.1 31. ISPF TABBED BROWSING

We have tabbed browsing in Internet Browsers, do we have anything similar in ISPF? Not exactly, but here is something close. Issue the Primary command: SWAPBAR or SWAPBAR ON This command places a bar at the bottom of the screen with the names of all the screens available on it.Click on any name, and you will be immediately swapped to that screen.
32. Jcl concatenation

A job is having several steps. 5th step of the job executes a COBOL program. 10 VSAM datasets were concatenated together as input file. One of the 10 concatenated Vsams is having issue ( say HURBA value is not high). How to identify the issue Vsam file from the list of 10 files ? Lot of ideas should have come in mind, say VERIFY, COBOL module, SORT etc. But the real deal is VSAM datasets cannot be concatenated.
33. Performance considerations for using CALLs (measuring CALL overhead only):

CALL to nested programs was 50% to 60% faster than static CALL. Static CALL literal was 45% to 55% faster than dynamic CALL literal. Static CALL literal was 60% to 65% faster than dynamic CALL identifier.
General TCS Public

Dynamic CALL literal was 15% to 25% faster than dynamic CALL identifier. (Souce: IBM Cobol V3R1 Performance Tuning)
34. EASY WAY TO FIND EMPTY DASD DATASETS IN ISPF

Sometimes we might browse all the GDG generations to find some account number or some other info . (Mostly prod supp will do that). We usually type 'B' or 'V' to browse/view the file and it will go to another panel and if it is empty we again come again 3.4 . There is one easy way in 3.4 DSLIST itself to check if the files are empty or not. In 3.4 DSLIST press PF11, you will see %USED. If that is '0' then the file is empty.
Command - Enter "/" to select action Tracks %Used XT ------------------------------------------------------------------------------SRWM00P.GB.BSTA0275.OTRNRPR.G0799V00 1 100 1 SRWM00P.GB.BSTA0275.OTRNRPR.G0800V00 1 0 1 SRWM00P.GB.BSTA0275.OTRNRPR.G0801V00 1 100 1 SRWM00P.GB.BSTA0275.OTRNRPR.G0802V00 23 100 1 SRWM00P.GB.BSTA0275.OTRNRPR.G0803V00 21 100 1 SRWM00P.GB.BSTA0275.OTRNRPR.G0804V00 24 100 1 SRWM00P.GB.BSTA0275.OTRNRPR.G0805V00 24 100 1 SRWM00P.GB.BSTA0275.OTRNRPR.G0806V00 1 0 1 SRWM00P.GB.BSTA0275.OTRNRPR.G0807V00 21 100 1 SRWM00P.GB.BSTA0275.OTRNRPR.G0808V00 24 100 1 SRWM00P.GB.BSTA0275.OTRNRPR.G0809V00 25 100 1 SRWM00P.GB.BSTA0275.OTRNRPR.G0810V00 24 100 1 SRWM00P.GB.BSTA0275.OTRNRPR.G0811V00 25 100 1 SRWM00P.GB.BSTA0275.OTRNRPR.G0812V00 1 0 1 SRWM00P.GB.BSTA0275.OTRNRPR.G0813V00 22 100 1 SRWM00P.GB.BSTA0275.OTRNRPR.G0814V00 24 100 1 SRWM00P.GB.BSTA0275.OTRNRPR.G0815V00 23 100 1 SRWM00P.GB.BSTA0275.OTRNRPR.G0816V00 23 100 1 SRWM00P.GB.BSTA0275.OTRNRPR.G0817V00 23 100 1 SRWM00P.GB.BSTA0275.OTRNRPR.G0818V00 1 0 1 SRWM00P.GB.BSTA0275.OTRNRPR.G0819V00 22 100 1 SRWM00P.GB.BSTA0275.OTRNRPR.G0820V00 20 100 1

35.

SINGLE COPY MULTIPLE PASTING

Often we encounter situations to copy single or bulk lines across several places in a member. Usually it will be pain copy that line every time since the clipboard will be erased once paste is done or we need to type CUT PASTE for every time. Now there is an easy way in ISPF with AK & A or BK &B command. For Example: In EDIT window,
General TCS Public

Bulk copy of lines or single copy


000001 000002 000003 000004 CC 000006 CC 000008 000009 000010 000011 000012 000013 000014 //ISDXS02M JOB (,Z3),'DYL TVLT', // CLASS=B, // MSGCLASS=X,TIME=NOLIMIT, // NOTIFY=&SYSUID //********************************************************************** //* TEST TEST TEST TEST * //********************************************************************** //SET001 SET OUTNODE4='DT070702' *DATE IN DSN OF OUTPUT //JOBLIB DD DSN=IOCP00P.PB.EMER.LOADLIB1,DISP=SHR // DD DSN=IOCP00P.PB.PROD.LOADLIB1,DISP=SHR // DD DSN=IOCP0$P.PB.SYSI.LINKLIB,DISP=SHR // DD DSN=SYS9.TBASE.LOAD,DISP=SHR // DD DSN=SYS1.SCEERUN,DISP=SHR // DD DSN=SYS3.MVSV5.RUNTIME,DISP=SHR

000001 000002 000003 000004 CC 000006 CC 000008 AK0009 000010 AK0011 000012 A00013

//ISDXS02M JOB (,Z3),'DYL TVLT', // CLASS=B, // MSGCLASS=X,TIME=NOLIMIT, // NOTIFY=&SYSUID //********************************************************************** //* TEST TEST TEST TEST * //********************************************************************** //SET001 SET OUTNODE4='DT070702' *DATE IN DSN OF OUTPUT //JOBLIB DD DSN=IOCP00P.PB.EMER.LOADLIB1,DISP=SHR // DD DSN=IOCP00P.PB.PROD.LOADLIB1,DISP=SHR // DD DSN=IOCP0$P.PB.SYSI.LINKLIB,DISP=SHR // DD DSN=SYS9.TBASE.LOAD,DISP=SHR // DD DSN=SYS1.SCEERUN,DISP=SHR

000001 000002 000003 000004 000005 000006 000007 000008 000009 000010 000011 000012 000013 000014 000015 000016 000017 000018 000019 000020 000021 000022 000023

//ISDXS02M JOB (,Z3),'DYL TVLT', // CLASS=B, // MSGCLASS=X,TIME=NOLIMIT, // NOTIFY=&SYSUID //********************************************************************** //* TEST TEST TEST TEST * //********************************************************************** //SET001 SET OUTNODE4='DT070702' *DATE IN DSN OF OUTPUT //JOBLIB DD DSN=IOCP00P.PB.EMER.LOADLIB1,DISP=SHR //********************************************************************** //* TEST TEST TEST TEST * //********************************************************************** // DD DSN=IOCP00P.PB.PROD.LOADLIB1,DISP=SHR // DD DSN=IOCP0$P.PB.SYSI.LINKLIB,DISP=SHR //********************************************************************** //* TEST TEST TEST TEST * //********************************************************************** // DD DSN=SYS9.TBASE.LOAD,DISP=SHR // DD DSN=SYS1.SCEERUN,DISP=SHR //********************************************************************** //* TEST TEST TEST TEST * //********************************************************************** // DD DSN=SYS3.MVSV5.RUNTIME,DISP=SHR

36.

CICS LOAD LIBRARY IDENTIFICATION

Are you one of the persons who get annoyed when the CICS code changes you did are not getting reflected in the CICS screen? One of the main reason may be the CICS module might getting loaded from a different loadlib other than what you have intended.
General TCS Public

In that case CICS CECI inquiry can come and help you out. CECI INQ PROG(XXXXXXXX) can be used to see the load dsn. For e.g if you are testing module BSTOREWD in CNEA1 region. 1) Log-on to CNEA1 2) New Copy the module ( as you obviously need to see your changes getting reflected) 3) Type CECI INQ PROG(BSTOREWD) 4) You will the below screen saying about to execute . Press ENTER

INQ PROG (BSTOREWD) STATUS: ABOUT TO EXECUTE COMMAND EXEC CICS INQuire PROGram( 'BSTOREWD' ) < STARt < AT() > | END | Next > < APist() > < CEdfstatus() > < COBoltype() > < CONcurrency() > < COPy() > < DAtalocation() > < DYnamstatus() > < ENTrypoint() > < EXECKey() > < EXECUtionset() > < Holdstatus() > < JVMClass() > < JVMProfile() > < LANGDeduced() > < LANGUage() > + < LEngth() >

NAME=

5) Then you will see all the info about the module BSTOREWD. Press F8.

General TCS Public

INQ PROG (BSTOREWD) STATUS: COMMAND EXECUTION COMPLETE EXEC CICS INQuire PROGram( 'BSTOREWD' ) < STARt < AT() > | END | Next > < APist( +0000001052 ) > < CEdfstatus( +0000000370 ) > < COBoltype( +0000000375 ) > < CONcurrency( +0000001050 ) > < COPy( +0000000667 ) > < DAtalocation( +0000000158 ) > < DYnamstatus( +0000001021 ) > < ENTrypoint( X'BAEC4020' ) > < EXECKey( +0000000382 ) > < EXECUtionset( +0000000384 ) > < Holdstatus( +0000000164 ) > < JVMClass( ' ) > < JVMProfile( 'DFHJVMPR' ) > < LANGDeduced( +0000000151 ) > < LANGUage( +0000000659 ) > + < LEngth( +0000124224 ) >

NAME=

' ...

6) You can see the Loadlib from which the module is getting executed.
INQ PROG (BSTOREWD) STATUS: COMMAND EXECUTION COMPLETE EXEC CICS INQuire PROGram( 'BSTOREWD' ) + < ENTrypoint( X'BAEC4020' ) > < EXECKey( +0000000382 ) > < EXECUtionset( +0000000384 ) > < Holdstatus( +0000000164 ) > < JVMClass( ' ) > < JVMProfile( 'DFHJVMPR' ) > < LANGDeduced( +0000000151 ) > < LANGUage( +0000000659 ) > < LEngth( +0000124224 ) > < LIBRARY( 'DFHRPL ' ) > < LIBRARYDsn( 'IUEXQQQ.PB.TESTONLY.LOADLIB < LOadpoint( X'3AEC4000' ) > < LPastatus( +0000000166 ) > < Progtype( +0000000154 ) > < REMOTEName( ' ' ) > < REMOTESystem( ' ' ) > + < REScount( +0000000000 ) > NAME=

' ...

' ) >

General TCS Public

You might also like