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

OUTFIL to pds members


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 202
Location: Toronto, ON, Canada

PostPosted: Tue Oct 08, 2013 9:11 pm
Reply with quote

What is the option to tell DFSORT to process multiple OUTFIL statements one at at time? I checked the reference manual but could not find the option. I think that be default DFSORT will process them in one pass.

I want to have multiple OUTFIL statements going to members of the same pds. I get a S213 abend.
Code:
OUTFIL FNAMES=MEM1,INCLUDE=(cond1)
OUTFIL FNAMES=MEM2,INCLUDE=(cond2)
//MEM1  DD DSN=MYPDS(MEM1),DISP=SHR
//MEM2 DD DSN=MYPDS(MEM2),DISP=SHR
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Tue Oct 08, 2013 9:16 pm
Reply with quote

Remember that you can only have one writer to a PDS at a time. This is likely the cause of the S213. Show the IEC143I message for a better diagnosis.
Back to top
View user's profile Send private message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 202
Location: Toronto, ON, Canada

PostPosted: Tue Oct 08, 2013 9:39 pm
Reply with quote

Akatsukami wrote:
Remember that you can only have one writer to a PDS at a time. This is likely the cause of the S213. Show the IEC143I message for a better diagnosis.

That is what I figured. Is there an option that tells DFSORT to process each OUTFIL statement one at a time? It would them make a pass over the data for each OUTFIL.
Code:
IEC143I 213-30,IFG0194D,JTERPCIC,SORT01,DB2E,71D0,DEV01A,  807
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Tue Oct 08, 2013 9:52 pm
Reply with quote

S213-30 is definitely more than one writer to a PDS:
Quote:
An attempt was made to open a partitioned data set (PDS) for OUTPUT,DISP=SHR. The PDS is already open in this condition, and a DCB is already open for output to the data set. The data set might be on the same system or on another system that is sharing the volume. Access was not serialized before the attempt to open the data set.

I don't know if there's an option only write one output at a time; Kolusu will know or know how find out. As a workaround, you could write the data to temporary data sets, and then copy them one at a time to the PDS.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Oct 08, 2013 10:57 pm
Reply with quote

No such option.

How about generating one file with IEBUPDTE control cards to ADD a member, followed by the data. Then run that control file through IEBUPDTE?
Back to top
View user's profile Send private message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 202
Location: Toronto, ON, Canada

PostPosted: Tue Oct 08, 2013 11:55 pm
Reply with quote

Thanks for the responses. I thought there was an option for this but maybe I was thinking of another tool.
I can't use IEBUPDTE as the lrecl > 80 bytes.
I will check StarBat or just code a rexx.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Oct 09, 2013 4:15 am
Reply with quote

Hi,

just create 2 separate datasets followed by 2 more steps to write each file into the PDS.



Gerry
Back to top
View user's profile Send private message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 202
Location: Toronto, ON, Canada

PostPosted: Wed Oct 09, 2013 7:02 pm
Reply with quote

gcicchet wrote:
just create 2 separate datasets followed by 2 more steps to write each file into the PDS.

I actually want to do a lot more then 2 outputs. I used just 2 for this posting to keep it simple.

I developed a Rexx to do what I want. It looks at the first 4 bytes of the record and writes all the records with the same value to a member with a name that matches the value.

I had confused an ICETOOL feature with OUTFIL. If doing a SORT or COPY to mutliple outputs:
Code:
COPY FROM(INDD) TO(OUTDD1,OUTDD2,OUTDD3) SERIAL
the parm SERIAL causes it to repeat the sort for each output. This won't work for what I was planning.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts OUTFIL with SAVE option DFSORT/ICETOOL 7
No new posts Duplicate several members of/in one l... JCL & VSAM 7
No new posts list pds members name starting with xyz CLIST & REXX 11
No new posts REXX editmacro to compare two members... CLIST & REXX 7
Search our Forums:

Back to Top