Write a JCL by using the below requirement:
File1 =1, File2 =11 and output needs to come as File3 =111?
Answer Posted / msharib
One can try this
//STEP2 EXEC PGM=SORT
//IN1 DD *
1
/*
//IN2 DD *
111
/*
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
JOINKEYS F1=IN1,FIELDS=(1,1,A)
JOINKEYS F2=IN2,FIELDS=(1,1,A)
REFORMAT FIELDS=(F1:1,1,F2:1,3)
OPTION COPY
/*
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
what is SOC4 error?
How can an in-stream dataset be terminated?
Which dd parameters are required?
Explain how can a stopped job be started again?
How dummy is used in jcl?
What do you understand by the term “keyword” with respect to jcl and what is the opposite of the term?
how do you code a null statement?
which utility is used to sort a file in jcl?
What is jcl in mainframe, and how many types of jcl statements are there for a job?
write a jcl to execute a job by 7:00 am on jan 20,1986?
How to read and write a single record into a file. I would like to use it to enter a single 8-character piece of information and use it to put it into a variable for processing in JCL. Thank you
How to pass data to a program that is coded in an exec statement?
Is automatic restart possible in jcl? If yes, how?
in a jcl, a large volume dataset is loaded to a table using bmcload in step1 and an image copy of the loaded table is taken using bmccopy in step2. Step2 abends because the image copy dataset cannot hold the volume of the table. How can this be rectified?
1) SORT FIELDS=(20,4,CH,D,10,3,CH,D) OUTREC FIELDS=(7:20,4,C' FUTURE ',20,2,10,3,1Z,1,9,13,7, 24,57,TRAN=LTOU,6X'FF') This example illustrates how a fixed-length input data set can be sorted and reformatted for output. The SORTIN LRECL is 80 bytes. The reformatted output records are fixed length with a record size of 103 bytes. SOLRF (the IBM-supplied default) is in effect, so unless the SORTOUT LRECL is specified or available, it will automatically be set to the reformatted record length of 103. in the above example i have some doubts that a) sort fields=(20,4,CH,D,10,3,CH,D) -what exactly it does and this fields related to output record fields or input record fields b)outrec used to refprmat the records after sorting that means could please reply me as soon as possible Thanks. Venkat