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 is notcat 2 - gs?

930


I have 60 steps in the JCL and want to Execute Only First from PROC by overriding in JCL ?

1341


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?

2214


when can a job time-out occur? How to overcome that?

748


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

1985






which utility is used to sort a file in jcl?

743


Explain about ISPF/TSO Commands

1308


Explain the purpose of dd dummy statement?

667


which utility is used a dummy utility?

783


what are the statements that are not valid to be included in an include statement?

776


How jcl is used for testing batch programs?

716


what is the difference between JES3 and JES2?

675


What statement marks the beginning of an in-stream or cataloged procedure in jcl and assigns default values to parameters defined in the procedure?

807


How can a fb file convert to vb file using sort program?

800


What are s0c1, s0c4, s0c5, s0c7 and socb?

695