IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Split a Dataset into multiple Members


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
yianis

New User


Joined: 14 Aug 2006
Posts: 45

PostPosted: Fri Nov 16, 2007 8:49 pm
Reply with quote

I have a job (DFSORT) for now and I read in a Dataset File and want to split it up into multiple output Members.

Here is a sample of my job:
Code:

//JS00200  EXEC PGM=ICEMAN                                             
//SYSOUT   DD SYSOUT=*                                             
//SORTIN   DD DSN=STG.MTL.C4.R01.ESM.BK.WORKFLOW.PROD(0),DISP=SHR   
//*                                                                 
//OUT001   DD DSN=JTZANET.ESM.SYSINESM(MTL003),DISP=SHR             
//OUT002   DD DSN=JTZANET.ESM.SYSINESM(MTL004),DISP=SHR             
//OUT003   DD DSN=JTZANET.ESM.SYSINESM(MTL005),DISP=SHR         
//SYSIN    DD *                                                     
  OPTION COPY                                                       
  OUTFIL INCLUDE=(01,03,CH,EQ,C'003'),FNAMES=OUT001                 
  OUTFIL INCLUDE=(01,03,CH,EQ,C'004'),FNAMES=OUT002                 
  OUTFIL INCLUDE=(01,03,CH,EQ,C'005'),FNAMES=OUT003                 


Now, I don't care if it's DFSORT or IDCAMS or FILEAID.

but I'm getting an Abend B14 and cannot do it....
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Fri Nov 16, 2007 9:03 pm
Reply with quote

Code:
 B14                                                                       
                                                                           
 Explanation:  The error occurred during processing of a CLOSE macro       
 instruction for a partitioned data set opened for output to a member. This
 system completion code is accompanied by message IEC217I. Refer to the     
 explanation of message IEC217I for complete information about the task     
 that was ended and for an explanation of the return code (rc in the       
 message text) in register 15.                                             

What rc code did you get?
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Fri Nov 16, 2007 9:10 pm
Reply with quote

The job seems fine. The B14 makes me suspect a problem with the PDS (not enough space, not enough directory blocks, etc.).
Back to top
View user's profile Send private message
yianis

New User


Joined: 14 Aug 2006
Posts: 45

PostPosted: Fri Nov 16, 2007 9:18 pm
Reply with quote

Actually, i increased the space etc.. and the error is IEC143I 213-30
It's because I am trying to update/create multiple members in the dataset and is causing a problem

It won't allow me to have multiple output members within a single step.

I don't want to split this job into n-multiple steps with each step having a single input and single output...I'd prefer to do it in 1 step but it seems you cannot do this...
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Fri Nov 16, 2007 9:21 pm
Reply with quote

I forgot, you're right, you can't do that. Maybe you'll find your answer using FileAid, unless a combination of SORT and IEBUPDTE would work for you?

I'll move this post over to the FileAid forum.
Back to top
View user's profile Send private message
yianis

New User


Joined: 14 Aug 2006
Posts: 45

PostPosted: Fri Nov 16, 2007 9:32 pm
Reply with quote

Yeah I know.. that's why I had it originally posted in the JCL forum...
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Nov 16, 2007 10:22 pm
Reply with quote

yianis wrote:
I have a job (DFSORT) for now and I read in a Dataset File and want to split it up into multiple output Members.

Here is a sample of my job:
Code:

//JS00200  EXEC PGM=ICEMAN                                             
//SYSOUT   DD SYSOUT=*                                             
//SORTIN   DD DSN=STG.MTL.C4.R01.ESM.BK.WORKFLOW.PROD(0),DISP=SHR   
//*                                                                 
//OUT001   DD DSN=JTZANET.ESM.SYSINESM(MTL003),DISP=SHR             
//OUT002   DD DSN=JTZANET.ESM.SYSINESM(MTL004),DISP=SHR             
//OUT003   DD DSN=JTZANET.ESM.SYSINESM(MTL005),DISP=SHR         
//SYSIN    DD *                                                     
  OPTION COPY                                                       
  OUTFIL INCLUDE=(01,03,CH,EQ,C'003'),FNAMES=OUT001                 
  OUTFIL INCLUDE=(01,03,CH,EQ,C'004'),FNAMES=OUT002                 
  OUTFIL INCLUDE=(01,03,CH,EQ,C'005'),FNAMES=OUT003                 


Now, I don't care if it's DFSORT or IDCAMS or FILEAID.

but I'm getting an Abend B14 and cannot do it....


Make the OUT001, OUT002, and OUT003 files temp files and add 3 iebgener steps to copy them into the JTZANET.ESM.SYSINESM pds.
Back to top
View user's profile Send private message
yianis

New User


Joined: 14 Aug 2006
Posts: 45

PostPosted: Fri Nov 16, 2007 11:39 pm
Reply with quote

I could do the same thing with the DFSORT (multiple steps), but I am trying to avoid the creation of multiple steps and would like to do it in a single step. The actual jobb will probably have 100 files to create and I want to avoid 100 steps...Thx for the suggestion
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Fri Nov 16, 2007 11:56 pm
Reply with quote

You could use separate PS datasets (with the last node different).
Or use a PDSE instead of a PDS.
Back to top
View user's profile Send private message
lcmontanez

New User


Joined: 19 Jun 2007
Posts: 50
Location: Chicago

PostPosted: Sat Nov 17, 2007 12:32 am
Reply with quote

you can also create a 1 step proc that is run 100 times.....
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Nov 20, 2007 7:25 am
Reply with quote

Hi,
you can get away with it in 2 steps.

See below

Gerry [/code]
//STEP0001 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
003
004
005
//*
//OUT001 DD DSN=&&O001,DISP=(,PASS,DELETE),UNIT=SYSDA,SPACE=(TRK,(1))
//OUT002 DD DSN=&&O002,DISP=(,PASS,DELETE),UNIT=SYSDA,SPACE=(TRK,(1))
//OUT003 DD DSN=&&O003,DISP=(,PASS,DELETE),UNIT=SYSDA,SPACE=(TRK,(1))
//SYSIN DD *
OPTION COPY
OUTFIL INCLUDE=(01,03,CH,EQ,C'003'),FNAMES=OUT001
OUTFIL INCLUDE=(01,03,CH,EQ,C'004'),FNAMES=OUT002
OUTFIL INCLUDE=(01,03,CH,EQ,C'005'),FNAMES=OUT003
//*
//**********************************************************************
//*
//REPRO EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//FILEIN1 DD DSN=&&O001,DISP=(OLD,DELETE)
//FILEIN2 DD DSN=&&O002,DISP=(OLD,DELETE)
//FILEIN3 DD DSN=&&O003,DISP=(OLD,DELETE)
/*
//FILEOUT1 DD DSN=PDS(A),DISP=SHR
//FILEOUT2 DD DSN=PDS(B),DISP=SHR
//FILEOUT3 DD DSN=PDS(C),DISP=SHR
//SYSIN DD *
REPRO INFILE(FILEIN1) OUTFILE(FILEOUT1)
REPRO INFILE(FILEIN2) OUTFILE(FILEOUT2)
REPRO INFILE(FILEIN3) OUTFILE(FILEOUT3)
Back to top
View user's profile Send private message
yianis

New User


Joined: 14 Aug 2006
Posts: 45

PostPosted: Tue Nov 20, 2007 9:45 pm
Reply with quote

Thanks... I actually created a dataset with the type as LIBRARY (i.e. PDSE) and it worked...I will also keep your suggestion in mind too.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
Search our Forums:

Back to Top