|
|
| Author |
Message |
jpdeshai
New User
Joined: 24 Jun 2007 Posts: 23 Location: Dallas
|
|
|
|
Hi,
Can any one help me creating the below report using DFSORT?
| Code: |
//******* THE INPUT:
//*
ZIP NAME PRTINTED ONLINE/BATCH
//*
09094 JP1 Y O
09094 JP2 Y O
09094 JP3 Y O
09094 JP4 Y B
09094 JP4 N
09099 GP Y B
09102 DJ Y B
09102 VK1 Y O
09102 VK2 Y B
09102 VK3 Y O
09104 VK3 N
09104 VK3 N
09104 VK3 N
//*
//****** THE RESULT SHOULD BE :
//*
MASS CARD PRINTED ZIP STAT - POV - REPORT
ZIP PRINTED-ONLINE PRINTED-BATCH TOT-PRINTED
//*
09094 3 1 4
09099 1 0 1
09102 2 2 4
TOTAL 6 3 9 |
|
|
| Back to top |
|
 |
References
|
Posted: Fri May 09, 2008 1:23 am Post subject: Re: Report to be generatd |
 |
|
|
 |
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 893 Location: Virginia, USA
|
|
|
|
| Are you sure you are using DFSORT and not Syncsort? |
|
| Back to top |
|
 |
jpdeshai
New User
Joined: 24 Jun 2007 Posts: 23 Location: Dallas
|
|
|
|
| our shop has both. I was trying with SYNCSORT. but not able to do as SLICE was not supporting completely. |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Moderator
Joined: 15 Feb 2005 Posts: 3973 Location: San Jose, CA
|
|
|
|
| Quote: |
| SLICE was not supporting completely |
I assume you mean SPLICE, but SPLICE isn't needed for this task.
You didn't explain anything about the "rules" for getting your report, so I'm just guessing that you want to remove any records that don't have O or B in position 24, and then get section totals and report totals for O and B separately for each Zip. I'm also assuming that your input records have RECFM=FB and LRECL=80. Lastly, I'm assuming that you got the output wrong for the 09099 line.
If all of my assumptions are true, then you can use this DFSORT job to produce the report you want:
| Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (FB/80)
//SORTOUT DD DSN=... output file (FB/80)
//SYSIN DD *
OPTION COPY
OMIT COND=(24,1,SS,NE,C'O,B')
INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:8C'0',89:8C'0',97:8C'0')),
IFTHEN=(WHEN=(24,1,CH,EQ,C'O'),OVERLAY=(88:C'1',104:C'1')),
IFTHEN=(WHEN=(24,1,CH,EQ,C'B'),OVERLAY=(96:C'1',104:C'1'))
OUTFIL NODETAIL,REMOVECC,
HEADER1=(' MASS CARD PRINTED ZIP STAT - POV - REPORT',/,
'ZIP PRINTED-ONLINE PRINTED-BATCH TOT-PRINTED'),
BUILD=(1,80),
SECTIONS=(1,5,
TRAILER3=(1,5,
11:TOT=(81,8,ZD,M10,LENGTH=8),
26:TOT=(89,8,ZD,M10,LENGTH=8),
38:TOT=(97,8,ZD,M10,LENGTH=8))),
TRAILER1=('TOTAL',
11:TOT=(81,8,ZD,M10,LENGTH=8),
26:TOT=(89,8,ZD,M10,LENGTH=8),
38:TOT=(97,8,ZD,M10,LENGTH=8))
/*
|
SORTOUT would have:
| Code: |
MASS CARD PRINTED ZIP STAT - POV - REPORT
ZIP PRINTED-ONLINE PRINTED-BATCH TOT-PRINTED
09094 3 1 4
09099 0 1 1
09102 2 2 4
TOTAL 5 4 9
|
In the future, please explain what you want in reasonable detail so people don't have to guess. |
|
| Back to top |
|
 |
jpdeshai
New User
Joined: 24 Jun 2007 Posts: 23 Location: Dallas
|
|
|
|
Hi Frank,
SOrry for not explaining the Requirement.
But it is working perfeclty as we require.
Thanks a lot. |
|
| Back to top |
|
 |
jpdeshai
New User
Joined: 24 Jun 2007 Posts: 23 Location: Dallas
|
|
|
|
Frank,
Could you pleeeease explain me about OVERLAY? In the Manuals I can see that it just OVERLAYS the values. But how it is accumulating in my SOrt Card? Not able to understand.
Thanks,
JP |
|
| Back to top |
|
 |
jpdeshai
New User
Joined: 24 Jun 2007 Posts: 23 Location: Dallas
|
|
|
|
Frank, Got the answer...from ur "what is new in dfsort manual." thanks.
your manuals are too good..keep it up. |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Moderator
Joined: 15 Feb 2005 Posts: 3973 Location: San Jose, CA
|
|
|
|
| I'm glad you figured it out yourself. |
|
| Back to top |
|
 |
|
|
|