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 |
How Can we see all generations of a GDG ?
How system will identify whether user wants to create PS or PDS? If answer is SPACE parameter then why we need to pass ps or po as dataset organisation while creation
Suppose i have 2 steps in my pgm. Step1- creates a file, Step2 - generates report from file in step1, What changes have to be made in Step2, so that if the file in Step1 is empty Step2 should not be executed? No changes to be made to Step1.
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 is the function of job statement in jcl?
what is the Difference between SYSIN and PARM ?
What is model dataset label(Model DSCB)?
What are three major types of JCL statements? What are their functions?
How to point my proc to production dataset always though i keep jcllib order=development.dataset? Is it possible?
There are 2PROCS in a JCL. I want following conditions to be carried out 1) 1st PROC should be executed as such In second PROC 2) First 4steps should not be executed 3) 5th step should not be executed 4) 6th and 7th step should be executed The change should be done only in the JCL and PROC should be untouched ?
What is a procedure?
A maximum of 100 chars can be passed to Cobol through Parm in JCL, If we want to pass more than 100 Chars how we can do it ?