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
Are you comfortable in cobol or jcl?
How do you reference the following file formats from cobol programs?
Write a cobol program making use of the redefine clause.
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
A table has two indexes defined. Which one will be used by the SEARCH?
how do you reference the esds vsam file formats from cobol programs
Difference between array and sub-script ?
What is the default value(s) for an initialize and what keyword allows for an override of the default?
how can i see junk values in dclgen or in hostvariable of comp ?
How can you get the ksds file records into your cobol program?
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
Discuss about changing dataset name in proc.
Write a program that uses move corresponding.
how to move the records from file to array table. give with code example
i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc