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
 

 

How to generate a report like this

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
kalukakkad

New User


Joined: 10 Mar 2005
Posts: 81

PostPosted: Tue Jul 17, 2007 1:29 pm    Post subject: How to generate a report like this
Reply with quote

I have an input file like this

KEY1 *
KEY2 *
KEY3
KEY4
KEY5 *
KEY6 *

My output file looks like this -- for each input record with '*' i have 2 records in the output file as 'KEY1' and 'KEY1 *'.

KEY1
KEY1 *
KEY2
KEY2 *
KEY3
KEY4
KEY5
KEY5 *
KEY6
KEY6 *

I need to create reports like this

1) Report from Input file
Count of '*' and ' ' records. I am doing like

OCCURS FROM(INDD) LIST(OUTDD) -
HEADER('ASTREIX') ON(6,1,CH) -
HEADER('COUNTS') ON(VALCNT,A1,N06)

ASTREIX COUNTS
2
* 4

But the count for ' ' should be 2 + 4 = 6(for each '*' there is one with ' ' -- see output file).
(a) I need to check if the count from input file is same as that in output.
(b) Also if there are any records in Input file not in output

How to accomplish this? Can anybody help.
Back to top
View user's profile Send private message

krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Jul 17, 2007 2:02 pm    Post subject:
Reply with quote

kalukakkad

Quote:
My output file looks like this

Have you already obtained this o/p?

Quote:
But the count for ' ' should be 2 + 4 = 6(for each '*' there is one with ' ' -- see output file).
Please explain this a bit more icon_rolleyes.gif
Back to top
View user's profile Send private message
kalukakkad

New User


Joined: 10 Mar 2005
Posts: 81

PostPosted: Tue Jul 17, 2007 2:12 pm    Post subject:
Reply with quote

No, i haven't.

OCCURS FROM(INDD) LIST(OUTDD) -
HEADER('ASTREIX') ON(6,1,CH) -
HEADER('COUNTS') ON(VALCNT,A1,N06)

Gives me 2 as a count for KEYs without '*'. I have to get it as 6. How to do it.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Tue Jul 17, 2007 2:16 pm    Post subject:
Reply with quote

kalukakkad,
Quote:
I have to get it as 6. How to do it.

Still unclear.
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Jul 17, 2007 3:20 pm    Post subject:
Reply with quote

kalukakkad
Quote:
My output file looks like this

The ICETOOL solution for generating
Code:
----+----1
**********
KEY1     
KEY1 *   
KEY2     
KEY2 *   
KEY3     
KEY4     
KEY5     
KEY5 *   
KEY6     
KEY6 *   

is
Code:
//*******************************************************               
//STEP001  EXEC PGM=ICETOOL                                             
//TOOLMSG  DD SYSOUT=*                                                 
//DFSMSG   DD SYSOUT=*                                                 
//IN1      DD *                                                         
KEY1 *                                                                 
KEY2 *                                                                 
KEY3                                                                   
KEY4                                                                   
KEY5 *                                                                 
KEY6 *                                                                 
/*                                                                     
//OUT1     DD SYSOUT=*                                                 
//TOOLIN   DD *                                                         
 COPY FROM(IN1)  USING(CP01)                                   
/*                                                                     
//CP01CNTL DD   *                                                       
  OUTFIL FNAMES=OUT1,IFTHEN=(WHEN=(6,1,CH,EQ,C'*'),
     BUILD=(1,4,/,1,6))   
/*                                                                     
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Jul 17, 2007 3:24 pm    Post subject:
Reply with quote

kalukakkad
Regarding this
Quote:
Gives me 2 as a count for KEYs without '*'. I have to get it as 6. How to do it.

As per my understanding you want count of all the records in the O/p, which do not have '*' in front of them right?
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Jul 17, 2007 4:03 pm    Post subject:
Reply with quote

kalukakkad
The complete DFSORT/ICETOOL solution for your question is here:
Code:
//*******************************************************               
//STEP001  EXEC PGM=ICETOOL                                             
//TOOLMSG  DD SYSOUT=*                                                 
//DFSMSG   DD SYSOUT=*                                                 
//IN1      DD DSN=... i/p file                                                         
//OUT1     DD DSN=... o/p file
//REPORT   DD SYSOUT=*                                                 
//TOOLIN   DD *                                                         
 COPY FROM(IN1) USING(CP01)                                   
 OCCURS FROM(OUT1) LIST(REPORT) -                                       
 HEADER('ASTREIX') HEADER('COUNTS') -                                   
 ON(6,1,CH) ON(VALCNT,N06)                                             
/*                                                                     
//CP01CNTL DD   *                                                       
  OUTFIL FNAMES=OUT1,IFTHEN=(WHEN=(6,1,CH,EQ,C'*'),
       BUILD=(1,4,/,1,6))   
/*                                                                     

o/p Report:
Code:
----+----1----+----2
ASTREIX    COUNTS   
-------   -------   
                6   
*               4   
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 Detailed Transaction History report f... Kyle Carroll CICS 5 Tue Oct 18, 2016 12:42 am
No new posts Easytrieve - Report writing - Only 1 ... Abhi Nature CA Products 2 Wed Sep 14, 2016 11:40 am
No new posts Daily report to be extracted from CA ... polymathtarun DFSORT/ICETOOL 5 Mon Jul 11, 2016 4:33 pm
No new posts Report view in Mobile devices Robert Sample All Other Mainframe Topics 0 Thu Jun 23, 2016 7:05 pm
No new posts COBOL Report view in Mobile devices balaji81_k COBOL Programming 4 Thu Jun 23, 2016 6:41 pm


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