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
What is a scope terminator give example?
) how do u code after getting data?
What is rmode(any) ?
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
How do you reference the fixed block file formats from cobol programs
) what is the difference between AID and HANDLE AID?
I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......
How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?
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
Can we redefine the field of x(200) to less than 200?
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
what happens if parmparameter passes zero bytes to the program
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
What is the difference between structured cobol programming and object alternativelyiented cobol?