MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using ICETOOL for a simple sort

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Thu Jul 24, 2014 3:00 am    Post subject: Using ICETOOL for a simple sort Reply with quote

The following example works fine using SORT, however, the "problem" is that the exact sort commands can't be generated as-is from our repository (limitations there). Here are the sort commands
Code:

SORT FIELDS=(1,72,A),FORMAT=BI                                   
SUM FIELDS=(111,9,ZD)                                             
OUTREC FIELDS=(1,72,C'2014-08-31',83,56,X'010C',C'2014-08',148,26)

Nothing complicated. Due to the limitations mentioned above, I would like to use ICETOOL instead. I tried various options, finally settling on
Code:

COPY FROM(SORTIN) TO(SORTOUT) USING(ICE1)

My JCL looks like this:-
Code:

//COMPIC1  EXEC PGM=ICETOOL                               
//*                                                       
//*                                                       
//TOOLMSG  DD SYSOUT=*                                   
//DFSMSG   DD SYSOUT=*                                   
//SYSOUT   DD SYSOUT=*                                   
//*                                                       
//TOOLIN   DD DSN=userid.FT.DATA(Q5970001),DISP=SHR         
//ICE1CNTL DD DSN=userid.FT.DATA(Q5970002),DISP=SHR         
//*                                                       
//SORTIN   DD DSN=various catenated files,DISP=SHR     
//*                                                       
//SORTOUT  DD DSN=userid.output.file,DISP=(,CATLG),
//         RECFM=FB,LRECL=173                             

The same JCL above run as a sort program (with the commands inline) works fine, but ICETOOL gives a 0C7.

Any suggestions ?
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Jul 24, 2014 11:13 am    Post subject: Re: Using ICETOOL for a simple sort Reply with quote

misi01 wrote:
The same JCL above run as a sort program (with the commands inline) works fine, but ICETOOL gives a 0C7

Any suggestions ?


An S0C7 abend is usually due to bad data. Are you absolutely sure that you are using the same input and control cards for PGM=SORT and PGM=ICETOOL JCL? Are you using SORTOUT dd as an Intermediate file? DFSORT/ICETOOL uses SORTOUT as a special ddname and should NOT be used. It is a documented restriction. Check the 2nd bullet point in this link.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ice1ca60/7.2.1

So I suggest you change your JCL to the following.

Code:

//COMPIC1  EXEC PGM=ICETOOL                               
//*                                                       
//TOOLMSG  DD SYSOUT=*                                   
//DFSMSG   DD SYSOUT=*                                   
//IN        DD DSN=various catenated files,DISP=SHR     
//*                                                       
//OUT      DD DSN=userid.output.file,DISP=(,CATLG),
//         SPACE=(CYL,(X,Y),RLSE)
//TOOLIN   DD *
  SORT FROM(IN) TO(OUT) USING(ICE1)
//*
//ICE1CNTL DD *
  SORT FIELDS=(1,72,A),FORMAT=BI                                   
  SUM FIELDS=(111,9,ZD)                                             
  OUTREC FIELDS=(1,72,C'2014-08-31',83,56,X'010C',C'2014-08',148,26)
//*


If you are still getting S0C7 abends then it is probably due to bad data. You can use ICETOOL's VERIFY operator to find out the invalid data.

Code:

//STEP0100 EXEC PGM=ICETOOL   
//TOOLMSG  DD SYSOUT=*         
//DFSMSG   DD SYSOUT=*         
//IN       DD  DISP=SHR,DSN=Your Input files concatenated             
//TOOLIN   DD *               
  VERIFY FROM(IN) ON(119,9,ZD)
//*

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Fri Jul 25, 2014 12:02 am    Post subject: Reply with quote

Thanks Kolusu. There turned out to be 2 errors in the logic/JCL.

One was the DD names as you pointed out.
The other was the fact that I was referring to the summation field as ZD rather than PD

Thanks again for the speedy help
_________________
Michael
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Jul 25, 2014 11:22 am    Post subject: Reply with quote

misi01 wrote:
Thanks Kolusu. There turned out to be 2 errors in the logic/JCL.

One was the DD names as you pointed out.
The other was the fact that I was referring to the summation field as ZD rather than PD

Thanks again for the speedy help


Misi,

The SORTOUT dd will ONLY be an issue if you are doing multiple ICETOOL operators and using SORTOUT as an intermediate file.

for ex: something like this

Code:

//SORTIN   DD DISP=SHR,DSN=Your Input file
//*
//SORTOUT  DD DISP=(NEW,PASS),DSN=&&TEMP,   
//         SPACE=(CYL,(10,10,0)),UNIT=SYSDA
//*
//TOOLIN   DD *
  COPY FROM(SORTIN) TO(SORTOUT) USING(ICE1) 
  OCCUR FROM(SORTOUT) LIST(LISTA)                      -     
        HEADER('XXXXXXXX')             ON(7,12,CH)     -     
        HEADER('ITEM')                  ON(19,4,CH)    -     
        HEADER('QUANTITY')              ON(VALCNT,A0)
//*

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group