Joined: 30 Mar 2011 Posts: 48 Location: United States
On November 9,2011 gylbharat posted a problem whereby he was trying to copy 100 sequential data set into a partitioned data set with the partitioned data set having 100 members. I have the same problem but I have only two sequential data sets. He used IEBGENER and apparently was successful in achieving his objective. I want to name my two members MYSASLOG and MYSASLST. Here is the JCL I believe would work but I am unsure of how to specify the names in the JCL.
Joined: 30 Mar 2011 Posts: 48 Location: United States
Thanks Dick. I will do that. To satisfy my curiosity, did gylbharat ( Nov 9, 2011 post) with his 100 sequential data sets then have to construct 100 steps in his JCL?
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
As a proof-of-concept, I whipped up this job:
Code:
//STEP0001 EXEC PGM=SORT
//SORTIN DD *
TEST RECORD 01 OF 10
TEST RECORD 02 OF 10
TEST RECORD 03 OF 10
TEST RECORD 04 OF 10
TEST RECORD 05 OF 10
TEST RECORD 06 OF 10
TEST RECORD 07 OF 10
TEST RECORD 08 OF 10
TEST RECORD 09 OF 10
TEST RECORD 10 OF 10
DATASET1
/*
//SORTOUT DD DSN=&&T1,DISP=(,PASS),UNIT=VIO
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL BUILD=(1,80,256:X)
/*
//*
//STEP0002 EXEC PGM=SORT
//SORTIN DD *
TEST RECORD 01 OF 10
TEST RECORD 02 OF 10
TEST RECORD 03 OF 10
TEST RECORD 04 OF 10
TEST RECORD 05 OF 10
TEST RECORD 06 OF 10
TEST RECORD 07 OF 10
TEST RECORD 08 OF 10
TEST RECORD 09 OF 10
TEST RECORD 10 OF 10
DATASET2
/*
//SORTOUT DD DSN=&&T2,DISP=(,PASS),UNIT=VIO
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL BUILD=(1,80,256:X)
/*
//*
//STEP0003 EXEC PGM=IEBGENER
//SYSUT1 DD DSN=&&T1,DISP=(OLD,DELETE)
// DD DSN=&&T2,DISP=(OLD,DELETE)
//SYSUT2 DD DSN=HLQ.FB256.PDS,
// DISP=(,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(CYL,(10,10,10),RLSE)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
GENERATE MAXNAME=3,MAXGPS=2
MEMBER NAME=MEMBER1
GROUP1 RECORD IDENT=(8,'DATASET1',1)
MEMBER NAME=MEMBER2
GROUP2 RECORD IDENT=(8,'DATASET2',1)
MEMBER NAME=MEMBER3
/*
Joined: 30 Mar 2011 Posts: 48 Location: United States
SuperK,
If I decipher your code in view of the IEBGENER documentation, then the GROUP RECORD statement will tell IEBGENER that the last record of the first member (MEMBER1) will have DATASET1 in the first 8 characters and the last record of second member (MEMBER2) will have DATASET2 in the first 8 characters. Can I assume that there is some way to use SORT to accomplish that?
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
Garry Carroll wrote:
Why not use IEBUPDTE ?
Why NOT to use IEBUPDTE :
You can use IEBUPDTE to create or modify sequential or partitioned data sets or PDSEs. However, the program can be used only with data sets containing fixed-length records of no more than 80 bytes. (It is used primarily for updating procedure, source, and macro libraries, such as those containing JCL.)
Joined: 30 Mar 2011 Posts: 48 Location: United States
I submitted a job last night using Dick's approach (later endorsed by gcicchet) and the job ran successfully. As I am an inquisitive fellow I will look into DFSORT and TRAILER as suggested by Bill and try to implement SuperK's approach when I have some free time. As always, your technical assistance is much appreciated.