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 

Error in ICETOOL control statement "ADD" verb....

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


Joined: 18 Jun 2003
Posts: 25
Topics: 11

PostPosted: Sat Mar 06, 2004 9:16 pm    Post subject: Error in ICETOOL control statement "ADD" verb.... Reply with quote

Hello,

Whatz the error here !! I am pasting the DFSMSG .

Code:

1ICE200I 0 IDENTIFIER FROM CALLING PROGRAM IS 0001                             
 ICE143I 0 BLOCKSET     COPY  TECHNIQUE SELECTED                               
 ICE000I 0 - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0 - 21:07 ON SAT MAR 06, 2004 -
0            OUTREC FIELDS=(1,5,6,4,6,4,14,4,18,4,                             
              22:06,04,PD,ADD,06,04,PD,80:X)                                   
                          $                                                     
 ICE007A E SYNTAX ERROR                                                         
 ICE146I 0 END OF STATEMENTS FROM CTL1CNTL - PARAMETER LIST STATEMENTS FOLLOW   
           DEBUG NOABEND,ESTAE                                                 
           OPTION LIST,MSGPRT=ALL,MSGDDN=DFSMSG,RESINV=0,SORTDD=CTL1,SORTIN=FILEIN*
                          ,SORTOUT=OUT,COPY                                     
 ICE052I 3 END OF DFSORT


My JCL:

Code:

//SORTTTL EXEC PGM=ICETOOL                       
//TOOLMSG  DD  SYSOUT=*                         
//DFSMSG   DD  SYSOUT=*                         
//FILEIN   DD  DSN=UT01.A.B,DISP=SHR                                               
//OUT DD  SYSOUT=*                               
//TOOLIN   DD  *                                 
COPY   FROM(FILEIN) TO(OUT) USING(CTL1)         
/*                                               
//CTL1CNTL DD  *                                 
  OUTREC FIELDS=(1,5,6,4,6,4,14,4,18,4,         
   22:06,04,PD,ADD,06,04,PD,80:X)               
/*                                               
//
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Sun Mar 07, 2004 7:09 am    Post subject: Reply with quote

You are probably using an older version of DFSORT.
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Sun Mar 07, 2004 11:01 am    Post subject: Reply with quote

hsubra,

In order to use DFSORT arithmetic expressions (e.g. ADD), you need to have DFSORT R14 PTF UQ90053 (Feb, 2003) installed. The syntax error indicates you do NOT have this PTF installed. Ask your System Programmer to install PTF UQ90053 (it's free). For complete information on the new features available with PTF UQ90053, see:

http://www.storage.ibm.com/software/sort/mvs/uq90053/index.html
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


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

PostPosted: Sun Mar 07, 2004 7:30 pm    Post subject: Reply with quote

Hsubra,
As frank and cogito mentioned you need to have the PTF UQ90053 installed for performing arthimetic operations. For some reason if you are not able to get the ptf applied , here is an alternative solution.

A brief explanation of the job, The first copy operator splits the a single input record into 2 records with a seqnum attached to it.

for ex: if your input is as below
Code:

----+----1----+----2----+----3----+----4----
ABCD                 0020                   
WXYZ                 0060                   


After the copy operation your output will be
Code:

----+----1----+----2----+----3----+----4----  8----+----
ABCD                 0020                      00000001
                     0020                      00000001
WXYZ                 0060                      00000002
                     0060                      00000002                   


The second sort operator takes in the file created above and just sum sorts the file yielding the desired output.

Code:
 
//STEP0100 EXEC PGM=ICETOOL                               
//TOOLMSG  DD  SYSOUT=*                                   
//DFSMSG   DD  SYSOUT=*                                   
//IN       DD  DSN=YOUR INPUT DSN,
//             DISP=SHR                                   
//T1       DD  DSN=&T1,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE)
//OUT      DD  SYSOUT=*                                   
//TOOLIN   DD  *                                         
   COPY FROM(IN) USING(CTL1)                             
   SORT FROM(T1) USING(CTL2)                             
//CTL1CNTL DD  *                                         
  OUTFIL FNAMES=T1,
  OUTREC=(01,5,6,4,6,4,14,4,18,4,     $ OUTREC AS IS
         06,4,80:X,SEQNUM,8,ZD,/,    $ POS 6,4, AND SEQNUM   
         22:6,4,80:X,SEQNUM,8,ZD)    $ AGAIN POS 6,4 AND SEQNUM       
//CTL2CNTL DD  *                                         
  SORT FIELDS=(81,8,ZD,A)             $ SORT ON SEQNUM                                 
  SUM FIELDS=(22,4,PD)                $ SUM ON ADDING FIELD     
  OUTFIL FNAMES=OUT,OUTREC=(1,80)     $ STRIP SQNUM                     
/*


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Sun Mar 07, 2004 7:36 pm    Post subject: Reply with quote

Note that Kolusu's "trick" can be used for ADD and (with some more tricks) SUB, but it can't be used for the other DFSORT arithmetic operations - MIN, MAX, MUL, DIV, MOD. So it's best to get PTF UQ90053 installed.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
hsubra
Beginner


Joined: 18 Jun 2003
Posts: 25
Topics: 11

PostPosted: Wed Mar 17, 2004 2:03 pm    Post subject: Reply with quote

Thanks Frank and Kolusu.

I was in vacation . So i couldnt reply. I have applied a similar logic for the above requirement.


Cheers,
Subra
Back to top
View user's profile Send private message
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