IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Splitting the report


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Shriram Jogdand

New User


Joined: 14 Oct 2008
Posts: 65
Location: Pune

PostPosted: Tue Aug 23, 2011 1:52 pm
Reply with quote

Hi,

I have a report(FBA,LREC=133) which I want to split into two files.

The first part is the individual code and their count for some ORG no.
The second part is the sum of the counts of these codes
The report is something like this

ORG-002
CODE COUNT
0001 10
0001 15
0002 20
0003 05
0003 10
0003 15

ORG-02
CODE COUNT
0001 25
0002 20
0003 30

The first part (ORG-002) is code and their counts. There can be duplicate code in first part. The second part (ORG-2) is the summation (total) of the code counts. Now I want to split the first half and second half in to different files. The only differenct that can be seen is that indidual CODE have ORG no as ORG-00 i.e there are 2 zeros after ORG. For summation level data, there is only one zero after ORG. (ORG-0)

Can anyone help me to split the files?
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Tue Aug 23, 2011 2:11 pm
Reply with quote

Can you please show us some examples how the input file looks like?
Back to top
View user's profile Send private message
Shriram Jogdand

New User


Joined: 14 Oct 2008
Posts: 65
Location: Pune

PostPosted: Tue Aug 23, 2011 2:14 pm
Reply with quote

It looks same as that I have explained in my fisrt post.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Aug 23, 2011 2:33 pm
Reply with quote

Shriram Jogdand wrote:
It looks same as that I have explained in my fisrt post.


Then I'd suggest amending the report to do the second group at "head of form" if it does not already, then, when it is printed, "tear along the dotted line".

If already at head of form, just go straight to the "tear..." bit.

gylbharat is asking for clarification of your requirement so that he can try to help. If there was sufficient information already, he wouldn't have to ask.

If that really is all your report is, then I stick by my suggestion as a workable solution.

Let me guess though, things aren't exactly as your wrote in your first post...?
Back to top
View user's profile Send private message
Shriram Jogdand

New User


Joined: 14 Oct 2008
Posts: 65
Location: Pune

PostPosted: Tue Aug 23, 2011 3:02 pm
Reply with quote

ORG - 001

TRAN DEBITS
CODE COUNT AMOUNT
005 306 27.677,91
006 0 ,00
010 1 40,00
014 5 135,00
020 0 ,00
110 0 ,00
112 0 ,00
127 2 1.117,36
135 1 15.038,50
005 859 85.421,44
006 0 ,00
010 1 40,00
012 4 1.841,10
014 7 210,00
020 0 ,00
050 1 35,86
110 0 ,00
112 0 ,00
124 0 ,00
127 6 285,81
135 1 204,64
149 4 28,00
227 0 ,00

ORG - 01

TRAN DEBITS
CODE COUNT AMOUNT
005 5,369 928.079,48
010 3 93,81
012 14 37.422,87
014 48 1.395,00
050 2 547,99
127 25 2.577,62
135 7 16.693,76
149 14 98,00
150 1 384,97
226 1 190,00
361 1 2.000,00
006 0 ,00
015 0 ,00
020 0 ,00
110 0 ,00
112 0 ,00
124 0 ,00
131 0 ,00
134 0 ,00
151 0 ,00
227 0 ,00
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Aug 23, 2011 3:24 pm
Reply with quote

Shriram Jogdand,
after 53 posts, you can use the code tags, here is how

first you provide a rather elitest
(no scratch that)
a childish response to a question
and then just blast garbage on the webpage.

with the code tags, we would know what column positions in which data resides.
now, we would have to wade thru this crap to determine column positions,
if we wanted to provide you with a solution.

if you want a solution,
suggest you start playing like a professional.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Aug 23, 2011 3:32 pm
Reply with quote

Still no headings? Not even a business date that the report is produced for? Page numbers?

You are now showing 001/01. Can we guess that this is followed by 002/02? So that you have alternate "chunks" of report that you want to split?

By far the easiest is to go back to the program that produces the report, and to do two seperate reports. If you can't do this, let us know why not before we go chasing solutions.

To split the report from DFSORT/ICETOOL we'd need to be able to accurately identify the stuff you want on one report and the stuff you want on the other.

As yet, we can't do this.

Sit down and look at your report. Think hard about what you would need to know with a robot collator. Work out exactly what you'd need to know to program the robot. That is what we'd need.

If you are not yet experienced in this method, try this: work out exactly what you need to do to make a cup of tea how you like it. Write it all down. Then make a cup of tea exactly as you have written it all down. If you get it right first time (I've never seen it done) then you are a genius, and you won't need us. If you don't get it right, then you'll get a better idea of how you have to explain things to people when you have a problem seeking a solution.

Someone has in their sig, something like "a problem explained well is a problem half-solved". Often, in just explaining everything without your pre-conceptions about what others "should" know, but don't, you'll even come to your answer.
Back to top
View user's profile Send private message
THINKSRINIII
Warnings : 1

New User


Joined: 09 Jan 2009
Posts: 88
Location: India

PostPosted: Tue Aug 23, 2011 3:36 pm
Reply with quote

Will your input file contain only one set of data. i.e Will it have only ORG 001 and ORG 01. Or Will there be multiple occurances?
ORG -001
ORG -01
ORG -002
ORG -02
Will it always occur in this order ? icon_confused.gif
Back to top
View user's profile Send private message
kratos86

Active User


Joined: 17 Mar 2008
Posts: 148
Location: Anna NGR

PostPosted: Tue Aug 23, 2011 4:17 pm
Reply with quote

Still the requirements are not clear. As per my understanding, If your input file has both the individual records and summed value record.

1. sort your file with the code and count in descending order.
2. Extract the first duplicate of all the code (which is the summation of the count record) in one file and other file will have all the remaining count values.

If this is not what you intended, you need to explain us clearly how your input file look like and what is the expected output.
Back to top
View user's profile Send private message
Shriram Jogdand

New User


Joined: 14 Oct 2008
Posts: 65
Location: Pune

PostPosted: Tue Aug 23, 2011 5:06 pm
Reply with quote

Hi kratos86,

Thanks for your help. It worked for me. Actually I dont know how to paste the mainframe screen here in forum. So I tried to copy paste the main lines from the report.

Sorry for the confusion but really thanks for the help.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Aug 23, 2011 5:49 pm
Reply with quote

since you missed it in my first post,
thought that I would repost, with a little larger font size so that you can see it:

code tags, here is how
Back to top
View user's profile Send private message
THINKSRINIII
Warnings : 1

New User


Joined: 09 Jan 2009
Posts: 88
Location: India

PostPosted: Tue Aug 23, 2011 8:57 pm
Reply with quote

DFSORT Alternate option to obtain File 1

Code:
//SYSIN DD *                                                   
  INREC IFTHEN=(WHEN=(1,3,CH,EQ,C'ORG'),OVERLAY=(15:C'YYY'),   
        HIT=NEXT),                                             
        IFTHEN=(WHEN=(1,6,CH,EQ,C'ORG-00'),OVERLAY=(25:C'XXX'))
                                                               
 OPTION COPY                                                   
 OUTREC IFTHEN=(WHEN=GROUP,BEGIN=(15,3,CH,EQ,C'YYY',AND,       
                           25,3,CH,EQ,C'XXX'),                 
                           END=(15,3,CH,EQ,C'YYY',AND,         
          25,3,CH,EQ,C'   '),PUSH=(31:ID=1),HIT=NEXT),         
          IFTHEN=(WHEN=(1,3,CH,EQ,C'ORG',AND,7,1,CH,EQ,C' '),   
               BUILD=(1,30,31:C' '))                           
 OUTFIL FNAMES=OUTPUT,INCLUDE=(31,1,CH,NE,C' ')                 
//STEP0002 EXEC PGM=SORT                                       
//SYSOUT DD SYSOUT=*                                           
//DFMSG DD *                                                   
//SORTIN DD DSN=&&TEMP1,DISP=SHR                               
//SORTOUT DD SYSOUT=*                                           
//SYSIN DD *                                                   
  OPTION COPY                                                   
  OUTREC BUILD=(1,10)
Code'd
The same could be modified to get File 2.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Aug 23, 2011 9:34 pm
Reply with quote

Hello,

Your reply has been "Code'd". Is there some reason you did not use the Code tag?
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Aug 23, 2011 9:53 pm
Reply with quote

Your requirement is clear as mud.... But thought of being psychic..

What I understood is..

You have some report which has multiple ORG segments followed by report details.. You want to have seperate output files for each segments...

Input:
Code:

ORG - 001               
TRAN DEBITS             
CODE COUNT AMOUNT       
005 306 27.677,91       
006 0 ,00               
010 1 40,00             
014 5 135,00           
020 0 ,00               
110 0 ,00               
ORG - 01               
TRAN DEBITS             
CODE COUNT AMOUNT       
005 306 27.677,91       
006 0 ,00               
010 1 40,00             
014 5 135,00           
020 0 ,00               
110 0 ,00               
112 0 ,00               
127 2 1.117,36           
135 1 15.038,50         
ORG - 002               
TRAN DEBITS             
CODE COUNT AMOUNT       
005 306 27.677,91       
006 0 ,00               
010 1 40,00             
014 5 135,00             
020 0 ,00               
110 0 ,00               
ORG - 02                 
TRAN DEBITS             
CODE COUNT AMOUNT       
005 306 27.677,91       
006 0 ,00               
010 1 40,00             
014 5 135,00         
020 0 ,00           
110 0 ,00           
112 0 ,00           
127 2 1.117,36       
135 1 15.038,50     


SORT STEP:
Code:

//STEP10   EXEC PGM=SORT                                             
//SORTIN   DD DSN=HLQ.FBA.L133.FILE,DISP=SHR                   
//OF1     DD DSN=HLQ.OP1
//OF2     DD DSN=HLQ.OP2
//OF3     DD DSN=HLQ.OP3
//OF4     DD DSN=HLQ.OP4
//SYSOUT  DD SYSOUT=*                                                 
//SYSIN    DD  *                                                     
  OPTION COPY,EQUALS                                                 
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(2,3,CH,EQ,C'ORG'),PUSH=(134:ID=8)) 
  OUTFIL FNAMES=OF1,INCLUDE=(134,8,ZD,EQ,1),BUILD=(1,133)             
  OUTFIL FNAMES=OF2,INCLUDE=(134,8,ZD,EQ,2),BUILD=(1,133)             
  OUTFIL FNAMES=OF3,INCLUDE=(134,8,ZD,EQ,3),BUILD=(1,133)             
  OUTFIL FNAMES=OF4,INCLUDE=(134,8,ZD,EQ,4),BUILD=(1,133)             
/*                                                                   

Output:
File1:
Code:

ORG - 001         
TRAN DEBITS       
CODE COUNT AMOUNT
005 306 27.677,91
006 0 ,00         
010 1 40,00       
014 5 135,00     
020 0 ,00         
110 0 ,00         

File2:
Code:

ORG - 01         
TRAN DEBITS     
CODE COUNT AMOUNT
005 306 27.677,91
006 0 ,00       
010 1 40,00     
014 5 135,00     
020 0 ,00       
110 0 ,00       
112 0 ,00       
127 2 1.117,36   
135 1 15.038,50 

File3
Code:

ORG - 002           
TRAN DEBITS         
CODE COUNT AMOUNT   
005 306 27.677,91   
006 0 ,00           
010 1 40,00         
014 5 135,00         
020 0 ,00           
110 0 ,00           

File4
Code:

ORG - 02             
TRAN DEBITS         
CODE COUNT AMOUNT   
005 306 27.677,91   
006 0 ,00           
010 1 40,00         
014 5 135,00         
020 0 ,00           
110 0 ,00           
112 0 ,00           
127 2 1.117,36       
135 1 15.038,50     
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need help on formatting a report DFSORT/ICETOOL 14
No new posts Creating Report using SORT DFSORT/ICETOOL 7
No new posts Ca7 long running jobs report All Other Mainframe Topics 1
No new posts Report of batch jobs JCL & VSAM 1
No new posts z/OS Modules Usage report using SMF 42 DFSORT/ICETOOL 2
Search our Forums:

Back to Top