How do you define a sort file in JCL that runs the COBOL
program?
Answer Posted / rik
YOU HAVE TO SIMPLY WRITE THE FOLLOWING CODE IN YOUR JCL :
//STEP1 EXEC PGM=SUPERSRT
//SORTIN DD DSN=TEST001.INFILE,DISP=SHR
//SORTOUT DD DSN=TEST001.SORTED,DISP=(NEW,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),
// UNIT=WORK,SPACE=(TRK,5,2),RLSE)
//SYSIN DD *
SORT FIELDS=(16,05,ZD,A)
/*
THE CONTAINT OF THE TEST001.INFILE WILL BE COPPIED TO
TEST001.SORTED FILE AND THIS TEST001.SORTED FILE WILL BE
SORTED IN ASCENDING ORDER OF THE CONTAINT OF FIELD POSITION
16 TO 20..
| Is This Answer Correct ? | 8 Yes | 5 No |
Post New Answer View All Answers
how to move the records from file to array table. give with code example
What is amode(31)
how do you reference the fixed unblock file formats from cobol programs
How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.
HOw can I get the negative sign while deduct high value from low value
How do get the result of your program directly on your pc?
What is rmode(24)
How to remove 2 duplicate records and copy only one using job control language?
Difference between array and sub-script ?
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
What is redefines clause in COBOL?
Write the code to count the sum of n natural numbers.
Give some examples of command terminators?
Why would you use find and get rather than to obtain?
What are the various section in data division and briefly explain them.