Joined: 19 May 2007 Posts: 5 Location: Toronto, Ontario
I wanted to select and sort 28 characters from the input dataset. I defined the output dataset to be fixed length 28. My SORT control statements are simply:
SORT FIELDS=(4,28,CH,A)
OUTREC FIELDS=(4,28)
I get:
INVALID DATA SET ATTRIBUTES SPECIFIED SORTOUT RECFM
Your control statements are ok, but in order to get that error message, you must have some kind of mismatch between the RECFMs of the input and output data sets. For example, the SORTIN file has RECFM=VB but you specified RECFM=FB for SORTOUT. As William says, show us your JCL, control statements and //SYSOUT messages (with the ICExxxs prefixes) and explain what you're trying to do (e.g. I'm trying to convert from VB to FB) and we'll tell you how to do it.
Joined: 19 May 2007 Posts: 5 Location: Toronto, Ontario
The input is VB 804. I want chars 4-31 in the output. I added 4 to account for the need to account for the bytes at the front of the record. I get a user completion code of 0043. Reason = 00000000 861. Not sure if the 861 is related.
JCL:
//TCCVJPS JOB (VD,898910),'P4,PHILIP',CLASS=A,NOTIFY=*,
// MSGCLASS=Q,TIME=10
//*
//SORT EXEC PGM=SORT
//SORTIN DD DISP=SHR,DSN=TCCV.GB02.COPYLOG(0)
//SORTOUT DD DISP=SHR,DSN=TCCV.TCCVJP.CPYLOG80
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(8,28,CH,A)
OUTREC FIELDS=(8,28)
/*
SYSOUT:
ICE000I J - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 09:30 ON WED JUN
SORT FIELDS=(8,28,CH,A)
OUTREC FIELDS=(8,28)
ICE043A K INVALID DATA SET ATTRIBUTES SPECIFIED SORTOUT RECFM
ICE052I J END OF DFSORT
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
The U0043 abend is associated with the ICE043A message. The ICE043A message indicates a RECFM conflict between you SORTIN and SORTOUT data sets. If your SORTIN data set has RECFM=VB as you say, then the conflict would be caused by your SORTOUT data set having RECFM=FB.
If you want to convert from a VB file to an FB file, you need to use the following control statements:
Joined: 19 May 2007 Posts: 5 Location: Toronto, Ontario
Thanks Frank. I added the VTOF parameter exactly as you specified but got the error:
Code:
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5
SORT FIELDS=(8,28,CH,A)
OUTFIL VTOF, BUILD=(8,28)
ICE003A 0 CONTINUATION LINE MISSING
So, figuring I could get around the VTOF problem by specifying a VB28 output file, I ran with the original JCL, and got this error:
Code:
ICE000I J - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 -
SORT FIELDS=(8,28,CH,A)
OUTREC FIELDS=(8,28)
ICE201I J RECORD TYPE IS V - DATA STARTS IN POSITION 5
ICE126A J INCONSISTENT *OUTREC IFTHEN 0 REFORMATTING FIELD FOUND
ICE052I J END OF DFSORT
Joined: 19 May 2007 Posts: 5 Location: Toronto, Ontario
Hi Frank,
Thanks for all the help. I'm finding out a lot about this powerful utility. Apparently I needed to add "1:" in the OUTFIL OUTREC statement to specify where in the output file the data was to start. That worked.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
I added the VTOF parameter exactly as you specified
Well, no you didn't. I have:
Code:
OUTFIL VTOF,BUILD=(8,28)
But you have:
Code:
OUTFIL VTOF, BUILD=(8,28)
You have a space before BUILD whereas I don't and that makes all the difference. The space indicates the end of the parameters so you essentially have:
Code:
OUTFIL VTOF,
The comma indicates the next line should have another parameter, but you don't have one so you get the continuation error.
Just remove the space before BUILD and it will work.
Quote:
Apparently I needed to add "1:" in the OUTFIL OUTREC statement to specify where in the output file the data was to start. That worked.
That wouldn't have worked. You must have done something else. The problem is that for a VB input file (when you don't specify VTOF), you must specify the RDW in positions 1,4. So you would need: