|
View previous topic :: View next topic
|
| Author |
Message |
Charles Wolters
New User
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.
| Code: |
//STEP1 EXEC PGM=IEBGENER
//SYSUT1 DD DSN=RMTPRD.EES.S688CLW.SASDLIB.LOG,
// DISP=(OLD,KEEP),UNIT=SYSPRD
// DD DSN=RMTPRD.EES.S688CLW.SASDLIB.LST,
// DISP=(OLD,KEEP),UNIT=SYSPRD
//SYSUT2 DD DSN=S688CLW.SASWORK.SASOUT,DISP=(NEW,CATLG,DELETE),
// UNIT=SYSPRD,SPACE=(TRK,(50,10,5)),
// DCB=(DSORG=PO,RECFM=FB,LRECL=256,BLKSIZE=12800)
//SYSIN DD *
GENERATE MAXNAME=2
MEMBER NAME=MYSASLOG MYSASLST
/*
//SYSPRINT DD SYSOUT=A
//SYDUMP DD SYSOUT=A
// |
Charles Wolters (AKA CW) |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
You cannot concatenate the input files as you have done.
Following the jcl you have, suggest you split this into 2 steps and copy one file to a member in each.
Processing one file per step will allow removing the SYSIN statements and using a //SYSIN DD DUMMY |
|
| Back to top |
|
 |
Charles Wolters
New User
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?
Charles |
|
| Back to top |
|
 |
superk
Global Moderator

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
/*
|
And it worked for me. |
|
| Back to top |
|
 |
Charles Wolters
New User
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?
Charles |
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
| What Sort product do you have? If DFSORT, have a look at TRAILER1. If not, I won't assume as I have no documentation. |
|
| Back to top |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
why not just run 2 steps as Dick suggested
| Code: |
//STEP0001 EXEC PGM=SORT
//SORTIN DD DSN=RMTPRD.EES.S688CLW.SASDLIB.LOG,
// DISP=SHR
//SORTOUT DD DSN=S688CLW.SASWORK.SASOUT(MYSASLOG),
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSPRD,SPACE=(TRK,(50,10,5))
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
/*
//*
//STEP0002 EXEC PGM=SORT
//SORTIN DD DSN=RMTPRD.EES.S688CLW.SASDLIB.LST,
// DISP=SHR
//SORTOUT DD DSN=S688CLW.SASWORK.SASOUT(MYSASLST),
// DISP=SHR
// DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
/* |
Also, do both files have the same DCB attributes ?
Gerry |
|
| Back to top |
|
 |
PeterHolland
Global Moderator

Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
| Why not use REPRO ? |
|
| Back to top |
|
 |
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1216 Location: Dublin, Ireland
|
|
|
|
| Why not use IEBUPDTE ? |
|
| Back to top |
|
 |
PeterHolland
Global Moderator

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.) |
|
| Back to top |
|
 |
Ramsee
New User
.jpg)
Joined: 06 Jan 2011 Posts: 53 Location: Chennai
|
|
|
|
Hi Charles Wolters,
You can take the below JCL this will do the needful,
//DP005HAU JOB (12345678),'SORT CARD',MSGCLASS=H,
// MSGLEVEL=(1,1),CLASS=A,NOTIFY=&SYSUID
//STEP01 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//INPUT01 DD DSN=DP005H.TEST.JCLLIB,DISP=SHR
//OUTPUT DD DSN=DP005H.TEST.UTILITY,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(10,10,10)),
// DCB=(LRECL=80,RECFM=FB,BUFNO=255)
//SYSIN DD *
COPY OUTDD=OUTPUT,INDD=INPUT01
SELECT MEMBER=((MEM1,MYSASLOG,R),(MEM2,MYSASLST,R))
/*
Please let me know if you found any other solution.
Regards,
Ramsee |
|
| Back to top |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Ramsee,
can you please explain how your example assists Charles.
He has 2 sequential files and wants to create 2 members in a a PDS.
How does your example do this ?
Gerry |
|
| Back to top |
|
 |
Ramsee
New User
.jpg)
Joined: 06 Jan 2011 Posts: 53 Location: Chennai
|
|
|
|
| Sorry Gerry i misunderstood the requirement and i gave a wrong reply. |
|
| Back to top |
|
 |
Charles Wolters
New User
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.
Charles |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|