I've one sequential file, that file size is LREC=100 (File
contain Records like 1 to 100). Now I was increase the file
size is LREC=102. My question is I want insert 00 (Two
Zeros) in to the new file (That output file looks like :
00123 up to 100). How will write the SORT card in JCL.
Please let me know.
Answer Posted / mahesh
Hi,
Please find the JCL below
//JOBCARD
//STEP1 EXEC PGM=SORT
//SORTIN DD DSN=INPUT-FILE,DISP=SHR(100 LENGHT)
//SORTOUT DD DSN=OUTPUT-FILE,DISP=NEW,DCB=(LRECL=102,..)
//.....
//.....
//SYSIN DD *
SORT FIELDS=COPY,
OUTREC BUILD=(1:C'00',3:1,100)
/*
Thanks & Regards,
Mahesh.
| Is This Answer Correct ? | 29 Yes | 0 No |
Post New Answer View All Answers
what is use of dsn parameter in dd statement?
What are the difference between jcl and jes?
what is use of dcb parameter in dd statement?
How jcl is used for testing batch programs?
List the different components of jcl statement?
have in 100 records in a file i want to read first 3 records and skip next 3 records and agan i want to read 3 records and again i want to skip 3 records... run a loop from record one to 10 evaluate i/3 if comes even then skip else write to output file
what is the purpose of coding class parameter in job statement?
what are the types of abends that occur on job failure? And explain the possible causes of these
What is the function of the dd dcb keyword?
Is their any limit for data sets?
What is use of restart and how to use it?
How to pass data to a program that is coded in an exec statement?
what are JCLLIB and STEPLIB in JCL?
what is “Cond= even” and “Cond=only”?
How do you create a temporary dataset?