I have two input SORTIN files and We need to create one
SORTOUT file which contains data of both input files. What
is the SortCard for this?. Suppose the length of the both
files are different, then How we do it? Please reply ASAP

Answers were Sorted based on User's Feedback



I have two input SORTIN files and We need to create one SORTOUT file which contains data of both i..

Answer / srk

//jobname job .......
//stepname1 exec pgm=sort
//sysprint dd sysout=*
//sortin01 dd dsn=file1,disp=shr
//sortin02 dd dsn=file2,disp=shr
//sortout dd dsn=mergefile,.......
//sysout dd sysout=*
//sysin dd *
merge fields=(starting field,length,merge-sequence,format)

/*
*above is the merge condition
//

Is This Answer Correct ?    8 Yes 0 No

I have two input SORTIN files and We need to create one SORTOUT file which contains data of both i..

Answer / vikas pujar

1) Sortcard to merge two files will be
//Sysin dd *
Sort fields=copy
/*

2) When try two merge two files using sort, first thing to see is they are of same length. If they are not, change the length of one equal to other in one more step which come prior to sort step.

Is This Answer Correct ?    2 Yes 1 No

I have two input SORTIN files and We need to create one SORTOUT file which contains data of both i..

Answer / srinivas yadav

any one plz write the code for this.

Is This Answer Correct ?    1 Yes 0 No

I have two input SORTIN files and We need to create one SORTOUT file which contains data of both i..

Answer / vikas pujar

Continuation to last answer. If the input files are of VB, even if length vary, files will be merged. The file with Max
RECFM and BLKSIZE will be used for output. But for FB files RECFM should be same.

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More JCL Interview Questions

In one of intervie, my interviwer asked, I have a file which contains 4 records I would like to split the 4 different outputs for each record how to do?

14 Answers   Cap Gemini, Cognizant, JPMorgan Chase, TCS, Xansa,


what are the ways of passing data to a cobol program from jcl?

1 Answers   IBM,


how do u define a file in cobol and jcl ?

2 Answers   TCS,


when we use sysprint and sysout statements

3 Answers  


a job have 5 steps and it will executes a proc which have 5steps in it. now i have to execute step3 only when step2 of proc executes successfully

3 Answers  






What are the parameter in the job card wihtout which job won't run........

10 Answers   IBM,


I have multiple jobs ( JCLs with several JOB cards ) in a member. What happens if I submit it?

16 Answers  


Explain the job statement in jcl?

0 Answers  


1) max no of steps with jcl job can execute 2) how many extentions r possible in sequencial files with job 3) what is set parameter will do 4)how to get syntax errors without sub 5) what is differ between error and abend 6) hw mvs knows who submitted the job and whoom it has to forward 7) what are the positinal parameters of data descripter

1 Answers   L&T,


i have 10 steps in my jcl. -->if i want to execute my program from 5th step what i have to do? don't give //* in ur previous steps --> if i want to execute my program from 1to 5 steps only what i have to do?

2 Answers  


Explain the function of job statement in jcl?

0 Answers  


how you can direct the data to spool using SYSOUT option?

0 Answers  


Categories