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 

Report Using 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 Oct 07, 2003 1:20 pm    Post subject: Report Using ICETOOL ? Reply with quote

Hi ,
I have a requirement and need your help on this. Need to insert the total on geo and total on serial in between the record for only record type '13'. If the geo change and serial is same need to write a GEO TOTAL line. If Serial change needs to write both GEO TOTAL and SER TOTAL line as explained below.
File is sorted in Record identifier, Serial and Geo .

Is there an way in ICETOOL? Or any utility?

File Layout:
1-6 Serial #
8-10 Geo
11-23 Amount trailing Sign
24-25 Rec identifier(Possible 11,12,13&14).

Input Data:
X00001 111 00000500.00- 11
Y00001 111 00000500.00- 12
000001 111 00000500.00- 13
000001 111 00001500.00- 13
000001 112 00000500.00 13
000002 111 00000500.00- 13

My output needs to be

X00001 111 00000500.00- 11
Y00001 111 00000500.00- 12
000001 111 00000500.00- 13
000001 111 00001500.00- 13
************************
Geo Total 00002000.00-
000001 112 00000500.00 13
************************
Geo Total 00000500.00
Ser Total 00001500.00-
000002 111 00000500.00- 13
************************
Geo Total 00000500.00-
Ser Total 00000500.00-


Thanks and Regards,
Subra
Back to top
View user's profile Send private message
Ed Goodman
Beginner


Joined: 12 Dec 2002
Posts: 10
Topics: 2

PostPosted: Tue Oct 07, 2003 2:08 pm    Post subject: Reply with quote

Yes, use the DFSORT OUTFIL parameter. The SECTIONS subparameter will allow you to break on different fields.

Go to the IBM website and grab your SORT manual.
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 Oct 07, 2003 8:19 pm    Post subject: Reply with quote

Subra,

Here's a DFSORT/ICETOOL job that does what you asked for. Note that the dddddddd.dds format is not supported for totals so we have to convert it to FS format (sdddddddddd), do the totals and then format it back to dddddddd.dds for output.

<Note to Ed: It took me quite a while to work this out and I wrote the DFSORT manual> Wink

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN DD *
X00001 111 00000500.00- 11
Y00001 111 00000500.00- 12
000001 111 00000500.00- 13
000001 111 00001500.00- 13
000001 112 00000500.00  13
000002 111 00000500.00- 13
/*
//T1112 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//T13 DD DSN=&&T2,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//T14 DD DSN=&&T3,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//CON DD DSN=*.T1112,VOL=REF=*.T1112,DISP=(OLD,PASS)
//    DD DSN=*.T13,VOL=REF=*.T13,DISP=(OLD,PASS)
//    DD DSN=*.T14,VOL=REF=*.T14,DISP=(OLD,PASS)
//OUT  DD SYSOUT=*
//TOOLIN DD *
  COPY FROM(IN) USING(CTL1)
  COPY FROM(CON) TO(OUT)
/*
//CTL1CNTL DD    *
* Change dddddddd.dds to sdddddddddd (FS format) in
* input records so we can do totals.
  INREC FIELDS=(1,11,  Bytes before amount
    12:23,1,  Sign
    13:12,8,  Digits before decimal point
    21:21,2,  Digits after decimal point
    24:24,57)    Bytes after amount
****
  OUTFIL FNAMES=T1112,
* Separate out '11' and '12' records.
    INCLUDE=(25,2,CH,EQ,C'11',OR,25,2,CH,EQ,C'12'),
* Change sdddddddddd (FS format) back to dddddddd.dds
    OUTREC=(1,11,
       12:12,11,FS,EDIT=(TTTTTTTT.TTS),SIGNS=(,,,-),
       24,57)
****
  OUTFIL FNAMES=T13,REMOVECC,
* Separate out '13' records.
    INCLUDE=(25,2,CH,EQ,C'13'),
* Change sdddddddddd (FS format) back to dddddddd.dds
    OUTREC=(1,11,
       12:12,11,FS,EDIT=(TTTTTTTT.TTS),SIGNS=(,,,-),
       24,57),
* Get totals as dddddddd.dds
    SECTIONS=(1,6,
      TRAILER3=('Ser Total',
       12:TOT=(12,11,FS,EDIT=(TTTTTTTT.TTS),SIGNS=(,,,-))),
      8,3,
      TRAILER3=('************************',/,
       'Geo Total',
       12:TOT=(12,11,FS,EDIT=(TTTTTTTT.TTS),SIGNS=(,,,-))))
****
  OUTFIL FNAMES=T14,
* Separate out '14' records.
    INCLUDE=(25,2,CH,EQ,C'14'),
* Change sdddddddddd (FS format) back to dddddddd.dds
    OUTREC=(1,11,
       12:12,11,FS,EDIT=(TTTTTTTT.TTS),SIGNS=(,,,-),
       24,57)
/*


The output is:

Code:

X00001 111 00000500.00- 11
Y00001 111 00000500.00- 12
000001 111 00000500.00- 13
000001 111 00001500.00- 13
************************
Geo Total  00002000.00-
000001 112 00000500.00  13
************************
Geo Total  00000500.00
Ser Total  00001500.00-
000002 111 00000500.00- 13
************************
Geo Total  00000500.00-
Ser Total  00000500.00-

_________________
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 Oct 08, 2003 3:59 pm    Post subject: Reply with quote

Frank ,

Thanks Frank, It worked for me .. Thanks a lot..

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