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.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / satish
//sysin dd *
option copy
oufil fnames=(ddname),build=(2c'0',1,100)
/*
| Is This Answer Correct ? | 1 Yes | 0 No |
How to compare 2 files using File-Aid?
I have GDG defined e.g. GDG.smaplegdg.base, after processing the GDG. it contains some records and which is input to the second step2. How can I use GDG to use it as input file at step2.
how to allocate a dynamic dataset in jcl ?
wht do u mean by notify parameter, how can u give acess to multiple users ?
What are the causes for S0C1, S0C4, S0C5, S0C7, S0CB abends ?
how to write a jcl prog to copy alternate recs from ps1 to another ps2,suppose ps1 having 10 recs?
How many types we can give input to JCL
Please give me the coding for converting VB to FB and FB to VB
What is the purpose of include statement in a JCL?
How many JOB statements a JCL can have ? If there are more than one JOB statements in a JCL, are they submitted in succession or in parallel ?
Wrete a JCL to compare two files and mached records move to onc file & un mached rows wants to another file?
13 Answers CGI, DSRC, IBM,
How to find the number of duplicates in a file using Sort?