Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to select a column range for output using SORT utility

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Jason Philip

New User


Joined: 19 May 2007
Posts: 5
Location: Toronto, Ontario

PostPosted: Wed Jun 06, 2007 1:59 am    Post subject: How to select a column range for output using SORT utility
Reply with quote

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
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 Jun 06, 2007 3:48 am    Post subject:
Reply with quote

Hello,

Please post your complete jcl and control statements as well as the diagnostic information you received when you ran the job.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Jun 06, 2007 4:00 am    Post subject:
Reply with quote

Jason,

You can look up that ICE043A message here:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CM20/2.2?DT=20060721170811

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.
Back to top
View user's profile Send private message
Jason Philip

New User


Joined: 19 May 2007
Posts: 5
Location: Toronto, Ontario

PostPosted: Wed Jun 06, 2007 7:03 pm    Post subject:
Reply with quote

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
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Jun 06, 2007 8:58 pm    Post subject:
Reply with quote

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:

Code:

    SORT FIELDS=(8,28,CH,A)
    OUTFIL VTOF,BUILD=(8,28)
Back to top
View user's profile Send private message
Jason Philip

New User


Joined: 19 May 2007
Posts: 5
Location: Toronto, Ontario

PostPosted: Thu Jun 07, 2007 7:39 pm    Post subject:
Reply with quote

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
Back to top
View user's profile Send private message
Jason Philip

New User


Joined: 19 May 2007
Posts: 5
Location: Toronto, Ontario

PostPosted: Fri Jun 08, 2007 12:18 am    Post subject:
Reply with quote

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.

Thanks again,

Jason
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Sat Jun 09, 2007 8:15 pm    Post subject:
Reply with quote

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:

Code:

   OUTREC FIELDS=(1,4,8,28)
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us