Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Incorrect output when trying to add n... monica1 PL/I & Assembler 10 Fri Jan 13, 2017 5:02 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us