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 

Need Help in ICETOOL

 
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: Tue Jan 04, 2005 3:49 pm    Post subject: Need Help in ICETOOL Reply with quote

Hi,

I am facing a critical issue using TRAILER with TOTAL in ICETOOL

Here is my JCL:
Code:

//SORTTTL EXEC PGM=ICETOOL                                   
//TOOLMSG  DD  SYSOUT=*                                       
//DFSMSG   DD  SYSOUT=*                                       
//OUT   DD  SYSOUT=*                                       
//FILEIN   DD  *                                             
 XXXXXX00046262I00000000000000{                               
 YYYYYY00000000{00000020315130H                               
 ZZZZZZ00000000{00000000042116F                               
 AAAAAA00000000{00000045433067L                               
/*                                                           
//TOOLIN   DD  *                                             
 SORT FROM(FILEIN) USING(CTL1)                               
/*                                                           
//CTL1CNTL  DD *                                             
 SUM FIELDS=(8,9,ZD,17,15,ZD)                                 
 SORT FIELDS=(1,7,CH,A),                                     
 DYNALLOC=(SYSDA,6),FILSZ=E3000000                           
 OUTFIL FNAMES=OUT,                                       
 TRAILER1=(C' TOTAL',1X,8:TOTAL=(8,9,ZD,M11,LENGTH=9),       
           17:TOTAL=(17,15,ZD,M11,LENGTH=15)),REMOVECC     
//

here 8-16 is a count and 17-31 is amount field . these are zoned decimal.

Here is my output
Code:

 DTLCNT00046262I00000000000000{   
 IMPINC00000000{00000020315130H   
 POSTAX00000000{00000000042116F   
 PRETAX00000000{00000045433067L   
 TOTAL 000462629000000250758199   

In the total line amount field is not included with sign. So i am always getting a +ve number. The last byte in total is x'F9' .. It suppose to be X'D9'.

Can anyone tell/advise me how to correct this ...

Cheers
Subra
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: Tue Jan 04, 2005 4:41 pm    Post subject: Reply with quote

Quote:
In the total line amount field is not included with sign. So i am always getting a +ve number. The last byte in total is x'F9' .. It suppose to be X'D9'.


You're using the M11 mask for the TOTAL in TRAILER1. M11 has the pattern T...T with no sign. That's why you're not getting the sign.

If you're asking how to get a signed ZD value for the TOTAL, you can do that with z/OS DFSORT V1R5 PTF UQ95214 or DFSORT R14 PTF UQ95213 (Dec, 2004) which allows TO=ZD in TOTAL. So you could use:

Code:

  OUTFIL FNAMES=OUT,                                     
  TRAILER1=(C' TOTAL',1X,8:TOTAL=(8,9,ZD,TO=ZD,LENGTH=9),
           17:TOTAL=(17,15,ZD,TO=ZD,LENGTH=15)),REMOVECC


If you're asking something else, please be more clear about what it is you're asking.
_________________
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: Tue Jan 04, 2005 5:10 pm    Post subject: Reply with quote

Thanks Frank. DFSORT R14 PTF UQ95213 is not available in my system. So please suggest me. I am going for a control statement with SORT & SUM fields . Is there any other technique ?
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: Tue Jan 04, 2005 6:15 pm    Post subject: Reply with quote

Here's a DFSORT/ICETOOL job that does what you want without using the new PTFs. Note that it's a bit more involved then the job with the new PTFs and requires MOD for the //OUT DD.

Code:

//SORTTTL EXEC PGM=ICETOOL
//TOOLMSG  DD  SYSOUT=*
//DFSMSG   DD  SYSOUT=*
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//OUT DD DSN=&&O1,UNIT=SYSDA,SPACE=(CYL,(5,5)),
//*** USE MOD FOR //OUT
//  DISP=(MOD,PASS)
//FILEIN   DD  *
 XXXXXX00046262I00000000000000{
 YYYYYY00000000{00000020315130H
 ZZZZZZ00000000{00000000042116F
 AAAAAA00000000{00000045433067L
/*
//TOOLIN   DD  *
  SORT FROM(FILEIN) USING(CTL1)
  COPY FROM(T1) TO(OUT) USING(CTL2)
/*
//CTL1CNTL  DD *
  SUM FIELDS=(8,9,ZD,17,15,ZD)
  SORT FIELDS=(1,7,CH,A),
    DYNALLOC=(SYSDA,6),FILSZ=E3000000
  OUTFIL FNAMES=OUT
* Create trailer record with FS totals.
  OUTFIL FNAMES=T1,REMOVECC,NODETAIL,
   TRAILER1=(1:TOTAL=(8,9,ZD,M26,LENGTH=10),
            11:TOTAL=(17,15,ZD,M26,LENGTH=16))
/*
//CTL2CNTL  DD *
* Convert FS totals to ZD totals.
  INREC FIELDS=(C' TOTAL',1X,8:1,9,FS,TO=ZD,LENGTH=9,
            17:11,15,FS,TO=ZD,LENGTH=15,80:X)
/*

_________________
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
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