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 |
01 GROUP-ITEM 05 AMOUNT-1 PIC 99V9 USAGE COMP VALUE 50 05 AMOUNT-2 PIC 9(4)V99 USAGE COMP MOVE ZERO TO GROUP-ITEM ADD 50 TO AMOUNT-1 what will be the content of AMOUNT-1? a.50 b.100 c.0 d.unpredictable
How is a type of file defined in the jcl that executes the cobol program?
How to Enter The Spool Area In Real Time?
What happens if both JOBLIB & STEPLIB is specified ?
what is the purpose of coding class parameter in job statement?
Explain the purpose of dd * statement in jcl?
What is QSAM error usually when it is occurs?
Why include statement is used in a jcl?
How to find out the number of records in a file using JCL
I have a dataset with record length 40 in production, due to some requirements it was changed to 80. Then how can we know the jobs which are effected by this change and how can we resolve it.
What is the maximum length of a single line of jcl?
what is the compile process of cobol program expalin with code