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
 
Create an output summary file

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

New User


Joined: 25 Jan 2007
Posts: 39
Location: Charleston SC

PostPosted: Thu Apr 26, 2007 3:08 am    Post subject: Create an output summary file
Reply with quote

I need of your help again. I need to create a summary file. The file attributes are as follows.

Input file:
LRECL: 73
RECFM: FB
The input file appears as follows:

Code:
----+----1----+----2----+----3----+----4----+----5----+---
CB6W001001                       F 000001000000000001
CB6W001001                       F 000001000001000001
CB6W001001                       F 000001000001000000
CB6W001001                       F 000001000000000001
CB6W001001                       F 000001000001000000
CB6W001001                       F 000001000001000000
CB6W001001                       F 000001000001000000
CB6W001001                       F 000001000001000000
CB6W001001                       F 000001000000000001
CB6W001001                       F 000001000001000000
----+----1----+----2----+----3----+----4----+----5----+---


I have to total the entries in column 36, 42, 48. For each record there can be multiple total counts. Beginning in column 5 for a length of 6 is the customer number, beginning in column 36 for a length of 6 is the read count, beginning in column 42 for a length of 6 is the update count, and beginning in column 48 for a length of 6 is the add count.

The file attributes of the output file are:

Output file:
LRECL: 80
RECFM: FB

The output FD is:

Code:
01 ICE-TOOL-OUT.
      05  ITO-CUST-NBR      PIC X(06).
      05  ITO-READ-CNT-TTL            PIC 9(06).
      05  ITO-UPDATE-CNT-TTL        PIC 9(06).
      05  ITO-ADD-CNT-TTL             PIC 9(06).




Desired output

Code:
----+----1----+----2----+----3----+----4----+----5----+---
001001000010000007000004
----+----1----+----2----+----3----+----4----+----5----+---



As always thank you for your help.
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: Thu Apr 26, 2007 3:43 am    Post subject:
Reply with quote

Bill,

Do you just want the totals for all of the records, or do you want totals for each customer number? You only show one customer number, but could there be more?
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: Thu Apr 26, 2007 4:06 am    Post subject:
Reply with quote

Quote:
For this particular task there will be just one customer number.


Bill,

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/73)
//SORTOUT DD DSN=...  output file (FB/80)
//SYSIN    DD    *
  OPTION COPY
  OUTFIL REMOVECC,NODETAIL,
    BUILD=(1,73,80:X),
    TRAILER1=(5,6,
       TOT=(36,6,ZD,M11,LENGTH=6),
       TOT=(42,6,ZD,M11,LENGTH=6),
       TOT=(48,6,ZD,M11,LENGTH=6))
/*
Back to top
View user's profile Send private message
Bill Ross

New User


Joined: 25 Jan 2007
Posts: 39
Location: Charleston SC

PostPosted: Thu Apr 26, 2007 7:32 pm    Post subject: Thank you Sir
Reply with quote

Your resolution worked superbly. Thank you.

I had worked on a resolution that was to complicated. My resolution was checking for input field values and "overlaying" depending on those values.

Once again thank you.
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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

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