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 Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm


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