View previous topic :: View next topic
|
Author |
Message |
jerryte
Active User
Joined: 29 Oct 2010 Posts: 202 Location: Toronto, ON, Canada
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
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 |
|
|
jerryte
Active User
Joined: 29 Oct 2010 Posts: 202 Location: Toronto, ON, Canada
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
jerryte
Active User
Joined: 29 Oct 2010 Posts: 202 Location: Toronto, ON, Canada
|
|
|
|
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 |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
just create 2 separate datasets followed by 2 more steps to write each file into the PDS.
Gerry |
|
Back to top |
|
|
jerryte
Active User
Joined: 29 Oct 2010 Posts: 202 Location: Toronto, ON, Canada
|
|
|
|
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 |
|
|
|