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
 
Report Generation in EZT>>> Need Help

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
jegan_selvan

New User


Joined: 23 Oct 2006
Posts: 24
Location: India

PostPosted: Thu Nov 11, 2010 1:17 pm    Post subject: Report Generation in EZT>>> Need Help
Reply with quote

Hi All,

Please find my requirement below in EZT.

Details of Input File:

I have two input File Say File 1 and File 2.
File1 is in FB format and it is in Table format.
FILE file1 TABLE(500)
ARG 1 3 A. DESC 4 56 A.
field1 W 56 A.
field2 field1 56 A.
PHONE field1 12 A.
dept field1 +12 09 A.
description field1 +21 35 A.

File 2 is Sequential File and FB (3700 0)
At position 100 Desc# is present with 3 character length.
At position 300 Date will be present with format MMDDYYYY

Requirement:

I need to write a report as mentioned below.

I need to get all the Desc# from the File1 and search how many records are available in the File2 and diaplay as count.
Then i need to display the corresponding dept number.
If there are 100 records i need to get the minimum date and the maximun date from the File2.
If there is no record for Desc# in File 2 then keep the date range as last week monday thru last week sunday.

Sample output

Desc# Count Department Date range

1 100 abc 11012010 - 11052010
2 130 aaa 11062010 - 11082010
3 0 bbb 11012010 - 11072010

Thanks in advance for your help.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Nov 11, 2010 3:45 pm    Post subject:
Reply with quote

So what have you already tried and what problems did you encounter.

Please show the code that you have generated that is not doing what you require.
Back to top
View user's profile Send private message
jegan_selvan

New User


Joined: 23 Oct 2006
Posts: 24
Location: India

PostPosted: Thu Nov 11, 2010 4:07 pm    Post subject: Reply to: Report Generation in EZT>>> Need Help
Reply with quote

Just started doing my first work in EZT.
Reading the Guide i am trying to get something.
I can able to read the File2 and match it with File1 and perform the action.
But wise versa i cant able to do
Back to top
View user's profile Send private message
jegan_selvan

New User


Joined: 23 Oct 2006
Posts: 24
Location: India

PostPosted: Thu Nov 11, 2010 4:15 pm    Post subject: Reply to: Report Generation in EZT>>> Need Help
Reply with quote

As of now i learned and coded to search other way. I dont know how to search the table file using input sequential file.

Please find the code below.

Code:
  SORT  FILE2  TO SORTFIL   USING +       
  (  S-NAME,           +       
     S-DESC#)         
    GET   SORTFIL                           
       IF    EOF SORTFIL. STOP.  END-IF.     

   SEARCH FILE1  WITH     S-DESC#  +     
                    GIVING   FIELD1               

 IF FILE1           
    PRINT R3           

 REPORT R3 LINESIZE   80 NOADJUST SPACE 0 TITLESKIP 2 TALLYSIZE 6 +   
      PAGESIZE  52  +                                                 
      PRINTER REPORT3  LONGDATE    +                                   
      SUMMARY  SUMCTL DTLCOPY                                         
                                                                       
      SEQUENCE S-DESC#                                     
      CONTROL  S-DESC#                                     
                                                                       
                                                 
      HEADING TALLY ('DESC' 'COUNT')                           
                                                                       
      LINE  01                   +                                     
               S-DESC#           +                                     
            +3  TALLY                                                 
                                                     
     TERMINATION. PROC.                             
         DISPLAY ' '                                               
         DISPLAY +20 'END OF REPORT (R3)'           
         DISPLAY ' '                                 
     END-PROC.                                       
             
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Thu Nov 11, 2010 9:49 pm    Post subject:
Reply with quote

Hello,

Suggest you talk with some co-workers and find another Easytrieve program that matches 2 files and generates a report. Clone this and customize for your requirement.

For starteres, you probably want both sets of data in the same sequence (by the 3-char "key"). Is there some reason file1 is being used as a table?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2437
Location: Netherlands, Amstelveen

PostPosted: Thu Nov 11, 2010 11:06 pm    Post subject:
Reply with quote

Dick,

the only reason i can think of the TS only wants to print if a match is found
in the tabel.
But what he wants of us? I dont know.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Fri Nov 12, 2010 12:36 am    Post subject:
Reply with quote

Hi Peter,

Yup, i believe that you are correct. But i'm not sure why the "driving" file is the table. . . icon_confused.gif

Possibly, jegan_selvan will clarify. . .
Back to top
View user's profile Send private message
jegan_selvan

New User


Joined: 23 Oct 2006
Posts: 24
Location: India

PostPosted: Fri Nov 12, 2010 10:32 am    Post subject: Reply to: Report Generation in EZT>>> Need Help
Reply with quote

Earlier we are asking only for the matched records. But now requirement got changed and we need all Table entry records into the report with count as 0 if they are not matched.
Earlier the File1 is searched dynamically and for that reason they kept it as a table. Even i am okay to have that as Sequence file with sorted order since now th erequirement is going to change.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Fri Nov 12, 2010 10:53 am    Post subject:
Reply with quote

Hello,

Suggest the files be sorted and the code changed to match the 2 sorted files.
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Report cost in CA-dispatch Nileshkul CA Products 3 Wed Jun 07, 2017 10:32 pm
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts Splitting of single report to seperat... abdulrafi TSO/ISPF 7 Mon Mar 27, 2017 3:59 pm
No new posts Easytrieve report shalem CA Products 4 Sun Feb 26, 2017 9:08 am
No new posts Detailed Transaction History report f... Kyle Carroll CICS 5 Tue Oct 18, 2016 12:42 am


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