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



I've one sequential file, that file size is LREC=100 (File contain Records like 1 to 100). No..

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

I've one sequential file, that file size is LREC=100 (File contain Records like 1 to 100). No..

Answer / satish

//sysin dd *
option copy
oufil fnames=(ddname),build=(2c'0',1,100)
/*

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More JCL Interview Questions

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

1 Answers  


How is a type of file defined in the jcl that executes the cobol program?

0 Answers  


How to Enter The Spool Area In Real Time?

7 Answers   IBM,


What happens if both JOBLIB & STEPLIB is specified ?

0 Answers  


what is the purpose of coding class parameter in job statement?

0 Answers   IBM,






Explain the purpose of dd * statement in jcl?

0 Answers  


What is QSAM error usually when it is occurs?

1 Answers  


Why include statement is used in a jcl?

0 Answers  


How to find out the number of records in a file using JCL

5 Answers   CTS,


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.

3 Answers   iGate,


What is the maximum length of a single line of jcl?

0 Answers  


what is the compile process of cobol program expalin with code

0 Answers   IBM,


Categories