how to concatenate datasets
Answers were Sorted based on User's Feedback
Answer / pkb
It is possible to process more than one data set as a single data set by concatenating the DD statements.
//QSAM0080 DD DSN=SIMOTIME.DATA.FILE0001,DISP=SHR
// DD DSN=SIMOTIME.DATA.FILE0002,DISP=SHR
// DD DSN=SIMOTIME.DATA.FILE0003,DISP=SHR
The following is an example of a COBOL SELECT statement.
here the COBOL program will read QSAM0080 and the DD statements will map the three files (FILE0001, FILE0002 and FILE0003) as one file. The program's initial read will get the first record from FILE0001 and will not get an End-of-File condition until the last record of FILE0003 is processed.
Is This Answer Correct ? | 8 Yes | 0 No |
Answer / suputhru
concatenation is possible up to 16 pds or 255 ps
We can cancatinating diffent files by giving their DSN one after other, all the datasets must be same type.
rules: there should be logical record length must be same
and type recfm is also same
//jobcard
//step1 exec pgm=concat11
//ddname DD dsn=tst.punna.cobol,
// DD dsn=tst.punna.cobol1,
// DD dsn=tst.punna.cobol11,
// DD dsn=tst.punna.cobol211,
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / chowdary
concatenation is possible up to 16 pds or 255 ps
rules: there should be logical record length must be same
and type recfm is also same
//jobcard
//joblib
//dd dsn=tst.punna.cobol,
dsn=tst.punna.cobol1,
like that we need to give up to our requirement
Is This Answer Correct ? | 4 Yes | 4 No |
Answer / shankar
we can also concatenate through disp keyword parameter also..
use iebcopy utility and
sysut1 dd dsn=sample1.pds,disp=(old,pass)
sysut2 dd dsn=sample2.pds,disp=(shr)
sysin dd *
copy indd=sysut1 outdd=sysut2
/*
Is This Answer Correct ? | 3 Yes | 3 No |
Say I have a file with 12 records. Each record has the name of the month. I have to append data in these 12 records into 1 record. How is it possible?
How do you handle empty files in a JCL ?
If Region=0k means What Happen?
Explain about LMPUT-
What is the difference between sb37,se37,sd37 each?
how to put a dependency on job in jcl using opc scheduler?
what is a cataloged procedure ?
Can I copy the FB (fixed Block) record length file to a VB (variable Block)record length file and Vise Versa? If Yes then how ? is that thru one of the JCL utility ?
I have a JCL with 100 steps. I want run the Alternate steps in the JCL ( Like 2 ,4,6,8 etc.. ). How can I acheive this scenario? If It is by Cond Parameter can you provide the Condition code for that?
5 Answers Polaris, Tech Mahindra, UST, Wipro,
What will happen if you attempt to restart a job in the middle of a JCL // IF .... // ENDIF?
I have an job having three job steps.Suppose i want to call a pgm in step2 and aproc in step3.How to write the code?
can we copy a file from fixed block to variable block and vice versa ....asap