P. 1
Mainframe Tips - Mar2010.

Mainframe Tips - Mar2010.

|Views: 15|Likes:
Mainframe Tips - Mar2010. complete collection
with all examples
Mainframe Tips - Mar2010. complete collection
with all examples

More info:

Published by: Anbazhagan Murugesan on Feb 04, 2013
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

06/30/2014

pdf

text

original

Res Count in PPT

Sometimes when we try to NEWCOPY our changes in CICS environment, we might get error message saying RES COUNT in not zero and it doesn't allow us to NEWCOPY. SE PROG(BSTOREWD) NEW STATUS: RESULTS - OVERTYPE TO MODIFY Prog(BSTOREWD) Leng(0000124672) Cob Pro Ena Pri Res(004) Use(0000000602) Any Uex Ful Qua Cic

Ced Len

CANNOT NEWCOPY

Res count is a parameter of PPT table in CICS. Res count shows the number of times the program is currently used. Say in the above example res count is 4 which indicates 4 other tasks or users are using the module BSTOREWD. NEWCOPY cannot be done until the RESCOUNT becomes zero. ( Res Count will be Zero when the task completes). So we need to wait until all other users completed their task .

Power of SS in DFSORT
Consider the below contents as some input record KANNA TCSL INFY WIPRO IBM CTS If we want to include only the records that contain the characters TCSL,INFY,WIPRO,IBM,CTS we usually go for include or omit and we write the control cards as below INCLUDE COND=(1,5,CH,EQ,C'TCSL',OR, 1,5,CH,EQ,C'INFY',OR, 1,5,CH,EQ,C'WIPRO',OR, 1,5,CH,EQ,C'IBM',OR, 1,5,CH,EQ,C'CTS') But there is an easy function called 'SS' to club this altogether and achieve this. Using SS we can write the control card as INCLUDE COND=(1,5,SS,EQ,C'TCSL ,INFY ,WIPRO,IBM ,CTS ') This will produce the same result as the above control card. The length of the string should match the length provided in the include card. for example to write CTS we should append 2 blanks as 'CTS ' since the length given in the card is '5'. Another power feature is it can search a constant within the field. Say for example consider the below records WOMENS DAY WAS NEWS YESTERDAY ALLDAY NEWS IS NITHAYANANDHA

General

IPL CRICKET WILL BE FUTURE NEWS NO SETHIGAL IN THIS LINE If we want to include the records that contain NEWS we can have the control card as INCLUDE COND=(1,70,SS,EQ,C'NEWS') The result will be WOMENS DAY WAS NEWS YESTERDAY NITHAYANANDHA IS ALLDAY NEWS IPL CRICKET WILL BE FUTURE NEWS

Browsing Errors within JJ
Issuing 'JJ' will check for JCl errors and list the numbered summary of errors in the top of the JCL . If we want to correct the error we usually press PF8 . If it is a big JCL we need to press multiple times PF8. But there is an easy way to go to the error directly. Type JJFE 1 in command line where JJFE means JJ Find Error and Numeric is the error number. Say for e.g if you want to go to error E8 type JJFE 8.

Interesting fact about "S0C7"
We all know that S0C7 is caused by data exception and can only occur when decimal (packed) instructions are used such as computation of nonnumeric literals or alphanumeric values. But the interesting fact is not always computing alpha numerics will result in S0C7. ( It works in different way as most of us think). Consider the below scenario

DATA DIVISION. WORKING-STORAGE SECTION. 01 SAMPLE PIC X(2) VALUE '1A'. 01 SAMPLE1 PIC 9(2) COMP-3. PROCEDURE DIVISION. MOVE SAMPLE TO SAMPLE1 DISPLAY SAMPLE1 ADD 1 TO SAMPLE1 DISPLAY SAMPLE1
Most of would think this will result S0C7 as the SAMPLE1 will contain the alphanumeric value "1A". But it won't result S0C7. (Please try and see). For calculation, the system will take only the lower order nibbles. S0C7 will occur only when an invalid value is present in the lower order nibble where invalid value means not simply alphabetic

General

characters stored in numeric field. This is because, if you try to move 1A to a numeric field, the COBOL compiler will do an automatic data conversion. 1A will be represented internally as 1 ==> F1 A ==> C1 1A FC 11 Here the lower order nibbles contain numeric 11 so if you move 1A to a numeric field and try to manipulate that filed, it won’t cause a S0C7 , because it contains 11. Suppose you are moving 9* to a numeric field. That will be represented internally as 9* F5 9C Now, the lower order nibbles contain an invalid character C, if you try to manipulate this field, it would cause a S0C7 abend.

Quick way to find number of recs updated in Db2
How can you quickly find out the number of rows updated after an update statement ? Check the value stored in SQLERRD (3). SQLERRD is an array of 6 elements in which SQLERRD (3) contains the number of rows that qualified to be deleted, inserted, or updated after an INSERT, MERGE, UPDATE, or DELETE statement .

Packed decimal performance consideration
Using odd number of digits for PACKED DECIMAL (COMP-3) is 5% to 20% faster than using even number of digits! Source : Z-OS V1R9 information center-beta

ISPF Option 6
We all know that using option 6 in ISPF we can enter native TSO command in mainframe environment. (I think in CITI we mainly use this option while SEND or RECEIVE files to host) The command option screen has a provision to store automatically previously used commands which can easily accessed by placing the cursor over there. But sometimes you might wonder that only sometimes some commands are getting stored and some or not stored. The actual reason behind is using TSO as prefix.

General

If you enter TSO as prefix and enter any command it will not be stored. If you don't prefix TSO it will be stored. ( Actually we don't need to use TSO while in option 6)

Your name in ISPF screen
Typing "SCRNAME ON" in the command prompt will display the IBM defined screen in the Top Left corner. You can assign your own screen name by typing "SCRNAME myscrname". This will be very useful for users those using the tso tabbed browsing command " SWAPBAR ON " for easy identification of screens.

Compressing data on TAPE
Mostly we all know compressing data in a DASD by specifying DATACLAS=COMPRESS in citi tso environment. Similarly we have JCL parameter to compact Tape cartridges. If you code "TRTCH=COMP" it will compact the data by a factor of 3. The system automatically uncompacts the data when it reads, so we need to specify compaction only when writing. Compaction not only compacts the data by factor of 3, but also reduces the i/o for the same time.

CALL or LINK which one is better ?
Dynamic CALL 1. CALL gives a better performance over LINK. The reason being CALL executes in the same run unit of the main program, where as LINK runs in a separate run unit. 2. CALL can be used to transfer more than 32K between the calling and called programs. 3. CALL can transfer multiple data elements, where as LINK can transfer only one. (DFHCOMMAREA) Link 1.Working storages of called programs are only FREEMAINed when the run unit collapses.That typically happens when you return from a LINK.It doesn't happen when you return from a CALL. 2.CICS debugger CEDF doesn't show CALL activity but does show LINKs 3.CALL can be used only with-in a single CICS region, where as LINK can be used to transfer control across regions. Sometimes LINK is better than CALL if you don't consider storage. Sometimes CALL is better than LINK.

General

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->