Tags

, , , ,

——————————————————————————————————————–
TIP # SORT

Do you know COBOL Internal SORT and MERGE is actually done by DFSORT ?!!
If you SORT or MERGE with COBOL, the compiler automatically generates a SORT or
MERGE control statement for you with the correct DFSORT descriptions for the COBOL fields
you specify.

——————————————————————————————————————–
TIP # SORT

How can I replace all the low-values in a file to spaces??
Use ALTSEQ CODE .
Here’s an example of how you could change all low values (X’00’) to spaces (X’40’), in an FB
data set with an LRECL of 80:
ALTSEQ CODE=(0040)
OUTREC FIELDS=(1,80,TRAN=ALTSEQ)
(Source: IBM SORT website)

——————————————————————————————————————–
TIP # SORT

SYNCSORT
My Production job is such that, on one of the steps it has to
copy a VSAM dataset to flat file, and then process that flat
file in the subsequent steps. Sometimes the input VSAM may be
empty. When its empty, my job abends. How can I prevent the job
from abending when the VSAM is empty ?
Pass the parameter, VSAMEMT=YES for the SORT utility.
i.e,
//STEP3 EXEC PGM=SORT,PARM=’VSAMEMT=YES’
//*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=VSAM.DSN
// DISP=SHR
//SORTOUT DD DSN=FLATFILE.DSN
// DISP=SHR
//SYSIN DD *
SORT FIELDS=COPY
/*


If you would like to Earn Free Stocks, Credit card Points and Bank account Bonuses, Please visit My Finance Blog

You may also like to look at:

Important SQL CODES and ABEND CODES
SORT JOIN – TO JOIN TWO FILES BASED ON A KEY
KNOW YOUR MAINFRAME
REXX – INITIAL SETUP
HOW TO SUBMIT A BATCH JOB FROM THE CICS PROGRAM
CICS – EXEC interface block – EIBRESP Values
CICS – EXEC interface block Fields
Flow of control between COBOL programs, run units, and CICS
CICS INTERVIEW QUESTIONS
CICS TIPS
COBOL – COPY and INCLUDE statements
COBOL – PERFORMANCE IMPROVEMENT
COBOL – SIGN STORED IN COMP, COMP-3 AND DISPLAY FORMATS
SHORTEST COBOL PROGRAM
RESTART LOGIC IN COBOL DB2 Program
GOBACK – EXIT PROGRAM – STOP RUN
Continuation lines in COBOL
Computational items – COMP, COMP 1 , COMP 2, COMP 3
COBOL program format
cobol indicator area column-7 and area a and area b
COBOL INTERVIEW QUESTIONS
COBOL TIPS
COBOL COMPILER OPTIONS
The IDENTIFICATION DIVISION