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

How to use COND Parameter in jcl

4 Answers   NIIT, Wipro,


i have a ps with two columns eno and ename , i need to copy eno column values in one ps and ename column values in one Ps ? is it possible through iebgener . how ? thx in advance

1 Answers   IBM, TCS,


What is Uncatalog dataset? How can we access/use them?

1 Answers  


I have a sequential file in which there are 50 records. Now I want to copy all the 50 records in the reverse order into a new file? The last record in the original file should be the first record in the new file. How can I do it?

4 Answers   IBM, TCS,


What is GDG?

1 Answers  






What are the differences between JES2 & JES3 ?

4 Answers  


Can we use two or more SYSPUNCH DD statements in a JCL for multiple unload (SYSREC00 & SYSREC01)..?

1 Answers  


what is use of dcb parameter in dd statement?

0 Answers   IBM,


The maximum number of in-stream procedure you can code in any JCL is ?

5 Answers  


IN MY JCL I VE 8 STEPS I WANT TO EXCUTE STEP 8 FIRST THEN EXCUTE STEP 4 ,HOW WILL EXCUTE STEP 8 BEFORE STEP 4?

7 Answers   Cognizant, IBM, IGT,


How jcl is used for testing batch programs?

0 Answers  


How many types we can give input to JCL

5 Answers   UHG,


Categories