Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Copy multiple sequential data sets into one PDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Charles Wolters

New User


Joined: 30 Mar 2011
Posts: 48
Location: United States

PostPosted: Wed Apr 18, 2012 1:08 am    Post subject: Copy multiple sequential data sets into one PDS
Reply with quote

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
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Apr 18, 2012 1:32 am    Post subject:
Reply with quote

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
View user's profile Send private message
Charles Wolters

New User


Joined: 30 Mar 2011
Posts: 48
Location: United States

PostPosted: Wed Apr 18, 2012 1:47 am    Post subject: RE: Copying multiple sequential data sets into a PS
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Apr 18, 2012 2:00 am    Post subject: Reply to: Copy multiple sequential data sets into one PDS
Reply with quote

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
View user's profile Send private message
Charles Wolters

New User


Joined: 30 Mar 2011
Posts: 48
Location: United States

PostPosted: Wed Apr 18, 2012 2:59 am    Post subject: RE:Copying multiple sequential files to a PS
Reply with quote

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
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Apr 18, 2012 3:33 am    Post subject: Reply to: Copy multiple sequential data sets into one PDS
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Wed Apr 18, 2012 4:04 am    Post subject:
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Wed Apr 18, 2012 12:46 pm    Post subject:
Reply with quote

Why not use REPRO ?
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 988
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Wed Apr 18, 2012 12:51 pm    Post subject:
Reply with quote

Why not use IEBUPDTE ?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Wed Apr 18, 2012 1:00 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Ramsee

New User


Joined: 06 Jan 2011
Posts: 52
Location: Chennai

PostPosted: Wed Apr 18, 2012 2:48 pm    Post subject:
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Wed Apr 18, 2012 4:13 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Ramsee

New User


Joined: 06 Jan 2011
Posts: 52
Location: Chennai

PostPosted: Wed Apr 18, 2012 4:54 pm    Post subject:
Reply with quote

Sorry Gerry i misunderstood the requirement and i gave a wrong reply.
Back to top
View user's profile Send private message
Charles Wolters

New User


Joined: 30 Mar 2011
Posts: 48
Location: United States

PostPosted: Wed Apr 18, 2012 6:30 pm    Post subject: RE:Copying multiple sequential data sets to one PS
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 1 Fri Dec 02, 2016 9:47 am
No new posts ODPP(Optim Data privacy Provider) Iss... Rama kishore IBM Tools 1 Mon Nov 07, 2016 5:46 pm
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm
No new posts output data in CSV Format janmejay COBOL Programming 8 Sat Oct 15, 2016 2:20 pm
This topic is locked: you cannot edit posts or make replies. output data in CSV Format janmejay DFSORT/ICETOOL 3 Sat Oct 15, 2016 2:16 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us