Can I concatenate various datasets whose organization are
different from each other. Lets say I want to cancatenate a
PDS file, a PS file, a GDG file etc. Can You do that ??
If yes, how ? is there any separate Utility to do so ???

Answer Posted / ayan

Test this code

//MYJOB1 JOB
(,L3),'MRJTEST',MSGCLASS=X,NOTIFY=&SYSUID,CLASS=B
//*

//STEP01 EXEC
PGM=SORT
//SYSOUT DD
SYSOUT=*
//*

//* *** INPUT PRINT FILE
***
//SORTIN DD DSN=&SYSUID..TESTGDG
(0),DISP=SHR
// DD
DSN=&SYSUID..EMPYT,DISP=SHR
// DD DSN=&SYSUID..TESTPDS
(TEST1),DISP=SHR
//*

//* *** OUTPUT EXTRACT FILE
***
//SORTOUT DD DSN=&SYSUID..TESTGDG
(+1),
// DISP=
(NEW,CATLG,KEEP),
// UNIT=SYSDA,SPACE=(CYL,
(10,5)),
// DCB=
(DSORG=PS,RECFM=FB,LRECL=80)
//*

//SYSIN DD
*
SORT
FIELDS=COPY

/*

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is use of dsn parameter in dd statement?

671


What is the purpose of dd * statement in jcl?

812


What is Cataloged Procedures?

715


Explain the function of the steplib dd statement?

647


State the uses of syspring, sysin, sort fields, sum fields and dummy.

654






How do you access an uncatalogued dataset in a jcl?

729


have in 100 records in a file i want to read first 3 records and skip next 3 records and agan i want to read 3 records and again i want to skip 3 records... run a loop from record one to 10 evaluate i/3 if comes even then skip else write to output file

924


Can we call instream to catalog and catalog to instream?

685


Can I share my data with other jobs? How?

670


Must tape dataset definitions include vol=ser specifications?

983


Name what parameter directs the output of the job log dataset?

563


What is jcl in mainframe?

690


What does a disposition of (MOD,DELETE,DELETE) mean ?

668


How to find the UNIT and VOLUME of a (a) KEPT (b) UNCATALOGED and (c) CATALOGED dataset - using (i) JCL and using (ii) ISPF ?

2173


How can unused space allocation be returned to the system when a dataset is closed?

812