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.

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to do automated restart when a job abends?

839


Explain about LMFREE�free data set from its association with data ID

993


Mainframes gets a text file that contains the name of the file. Now using JCL i want to locate that file name in the mainframe system and perform further processing. Please tell how to proceed

1960


how would you create a temporary dataset? And where will you use them?

760


Is it possible to left uncode disp? If yes, how?

700






What is the job entry system used in your project? based on what criteria the sequence of jobs are picked if priority is not mentioned in the job card?

1803


What is 'mounting' of volumes ? Is there anything that a programmer can do in it ? How to find currently mounted volume ?

1985


Explain how can values be passed from the job stream to an executable program?

608


Brief description of inline procedure of jcl.

677


How to override loadlib?

1410


I have mainpgm(abc) this is the only cobol pgm(non-db2).And this pgm calling subpgm name "acd" this also only cobol(non- Db)and this pgm calling some other subpgm this pgm has cobol-db2 pgm. 1) IF you calling static mode how to run and how to compile? 2) IF you calling dynamic mode how to run and how to compile? plz suggestion me.

1943


What does it mean by Restart and Checkpoint in JCL ? How are checkpoints being taken and what is their usage ? How to use Checkpoint macro on a JOBSTEP ?

9205


How to pass data to a program that is coded in an exec statement?

815


What is jcl in mainframe?

682


What is the function of the dd dcb keyword?

819