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

What do you understand by the terms: joblib and steplib?

0 Answers  


Can you delete the GDG base without deleting GDG generations ?

7 Answers   Cap Gemini,


If the COND parameter is specified in both the JOB and EXEC statements, which one will take precedence? If JOB takes priority and if all the conditions evaluate to false, then will the conditions on the EXEC step be evaluated next?

4 Answers   Wipro,


Definition of COND parameter in JCL

5 Answers   TCS,


what r the types of job control statements?

2 Answers  






What are the maximum and minimum sizes of any CONTROL AREA (VSAM datasets) ?

2 Answers   Patni,


what is the restart?hopw it is invoked?

1 Answers  


What is one line to pass PARM from JCL to COBOL?

0 Answers  


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

0 Answers  


What is a GDG? How is it referenced? How is it defined? What is a MODELDSCB?

3 Answers  


What you mean by skeleton JCl?

2 Answers  


Is there a limit of 3273 DD statements for a JCL or for every EXEC step in a JCL?

2 Answers  


Categories