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


Please Help Members By Posting Answers For Below Questions

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

626


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?

820


Give the syntax of job specifying jcl statement.

640


Suppose there are 2 Input files Infile-1 and Infile-2. Both the Files contain Employee Records. You need to compare both the files and Write the Common Records in third file named Outfile. How can we do this using File-Aid?

2221


I need exexution process for JCL programs

1852






if we want to use a gdg which is already created by some job, then how to use the reference of the last generation in a jcl?

1616


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

686


Many jcl statements contain specific values designed to direct and control the execution of the statement. What are these fields called?

720


what is the resolution for sb37 error

7716


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.

1953


How can a jobs execution priority be modified?

799


What is job control language?

611


What is the function of dd name parameter with a 2 part structure; audit.report?

703


what happens in execution stage in job processing?

657


What is the function of //cntl statement?

831