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
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 |
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 |
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 |
what is “Cond= even” and “Cond=only”?
how can we pass parameters from JCL to cobol subprogram...my requirement is i should not get data from mainprogram but i need it from JCL directly
I have two files each contains 10 records. I would like to copy both files into one output file but in alternate sequence. for e.g. first record from file1 then record 2 from file2.....
What are the parameter we cannot use in procedure? How many instream we can write in single jcl?
how to see the latest generation in gdg?
What are the differences between JES2 & JES3 ?
why should SYSIN DD * statement should not be included inside a PROCedure snippet??? please answer this.. i need to know.
Describe the various parameters utilized in the creation of a gdg?
How does -818 sql error occur? Why does it happen and what can be done to overcome this error code?
what are the types of abends that occur on job failure? And explain the possible causes of these
I have a job (4 steps) with time parameter coded in job & exec, say time=10 in job & time =3,2,2,4 in each steps. Will the job executes successfully?
Can a PROC CALL another PROC ? (in both Instream and Cataloged cases) ?