OUTFIL INCLUDE=(41,1,ZD,EQ,3),
BUILD=(C'HI,',/,/,
C'TOTAL COUNTS IN FILE 1 : ',01,10,/,
C'TOTAL COUNTS IN FILE 2 : ',11,10,/,/,
C'PERCENTAGE OF TOTAL COUNTS IN FILE 2 ',
C'WITH RESPECT TO COUNTS IN FILE 1 :',21,6,C'%',/,/,
C'THANKS.',80:X)
//*
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
TS70363,
i realize you have only been here for a couple of years,
and only have 50 posts,
but,
instead of wasting your time google'n,
why not use the hyperlink at the top of everypage in this website
that says IBM MANUALS (yep, that's a link)
then you can find the DFSORT manuals.
or,
you can look at the STICKY's in the dfsort forum,
which point to reference material
or
just click on the hyperlink in Kolusu's signature
and then click on publications.
For all the records in the input file - it will add a sequence number 1,2,3... at 41st position with bytes 1-30 as spaces
Intermediate File
Code:
=COLS> ----+----1----+----2----+----3----+----4---
****** ***************************** Top of Data *
000001 00000087251
000002 00000285302
000003 26.99 3
****** **************************** Bottom of Data
Will group 3 records beginning when 41st byte is 1 and place 31:10 charaters at starting at position 1
Intermediate File
Code:
=COLS> ----+----1----+----2----+----3----+----4----
****** ***************************** Top of Data **
000001 0000008725 00000087251
000002 0000008725 00000285302
000003 0000008725 26.99 3
****** **************************** Bottom of Data
=COLS> ----+----1----+----2----+----3----+----4----
****** ***************************** Top of Data **
000001 0000008725 00000087251
000002 00000087250000028530 00000285302
000003 00000087250000028530 26.99 3
****** **************************** Bottom of Data
Line 3
Code:
IFTHEN=(WHEN=(41,1,ZD,EQ,3),OVERLAY=(21:31,10))
Intermediate file
Code:
****** ***************************** Top of Data *
=COLS> ----+----1----+----2----+----3----+----4---
000001 0000008725 00000087251
000002 00000087250000028530 00000285302
000003 0000008725000002853026.99 26.99 3
****** **************************** Bottom of Data
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
TS70363,
apologize for my sarcasm.
you have done well too in your efforts.
either Bill or Kolusu will come along,
and I am sure that they will be happy to provide you with further insights.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
I wish more people took the effort to do this to understand the solutions provided. Good job.
In doing this, you are far more likely to be able to do something similar next time, or even get some ideas for doing something dissimilar.
Notice that Kolusu would have done it differently if there were several million records involved, but "starting at 10s" and the repeated data makes the final part easier to code and understand for "short" files like yours.
The idea has been "get all the information I need onto one record, and then only use that record in OUTFIL to produce the report".
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
TS70363,
Kudos to you and you have a done an excellent job and your interpretation of the control cards is good. I wish more people do this.
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from: