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

Record Count and Report printing in EZT


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jegan_selvan

New User


Joined: 23 Oct 2006
Posts: 24
Location: India

PostPosted: Tue Nov 16, 2010 5:30 pm
Reply with quote

Hi,

I need some help from you for the below requitement in EZT.

I have two files with FB format. I will read File 1 and for that record i need to search until EOF of File2 and get the count and print as the report. If record not exists in File 2 then zero is moved. I need to perform this until EOF File1.

File 1 is 20 Character and first 3 charater is the Key.
File 2 is 80 Character and first 3 charater is the Key.
Output File should be with 80 Characters and also i need to write the output file.

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

Global Moderator


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

PostPosted: Tue Nov 16, 2010 7:09 pm
Reply with quote

I have the feeling you asked this already in other words.
Back to top
View user's profile Send private message
jegan_selvan

New User


Joined: 23 Oct 2006
Posts: 24
Location: India

PostPosted: Tue Nov 16, 2010 7:48 pm
Reply with quote

Yes.. Now i splitted my requirement and started learning by each requirement. If i got some basic help from you people it will be much pleasure
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Nov 16, 2010 8:09 pm
Reply with quote

So what does it say in the product manuals on how to do this.
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 Nov 16, 2010 9:49 pm
Reply with quote

Hello,

You need to post some sample data from both input files and the output you want from this input. If duplicates can occur in either files, this needs to be in the sample data. Post the "rules" to be used to accomplish the needed output.

Post the code you have so far and explain where you have a question or problem.
Back to top
View user's profile Send private message
jegan_selvan

New User


Joined: 23 Oct 2006
Posts: 24
Location: India

PostPosted: Wed Nov 17, 2010 11:42 am
Reply with quote

Please find my proceeding on the same.
Code:

JOB  NAME METRICS INPUT NULL     START BEGIN FINISH   FINISH         
                                                                     
    REC-CNT-O  = 0                                                   
    GET PIMSCU0A                                                     
    DO WHILE NOT EOF PIMSCU0A                                         
       IF PHA-PREFIX =  S-PIM-NUM                             
        MOVE   PHA-DEA        TO       S-DEA-NUM               
        MOVE   PHA-PHONE      TO       S-PHNO                   
        REC-CNT-O  = REC-CNT-O + 1                                   
       END-IF                                                         
       IF PHA-PREFIX < S-PIM-NUM                             
             PRINT R3                                                 
             REC-CNT-O  = 0                                           
             GET PIMSCU0A                                             
      ELSE                                                           
        GET SORTCUR                                                   
      END-IF                                                         
    END-DO.                                                           
      PUT    CUREOUT        FROM     SORTCUR.       
      IF (EOF PIMSCU0A) OR (EOF SORTCUR)             
      STOP                                           
      END-IF.                                       
                                                     

 REPORT R3 LINESIZE   80 NOADJUST SPACE 0 TITLESKIP 2 TALLYSIZE 6 +   
      PAGESIZE  52  +                                                 
      PRINTER REPORT3  LONGDATE    +                                   
      SUMMARY  SUMCTL DTLCOPY                                         
                                                                       
      SEQUENCE S-PIM-NUM                                       
      CONTROL  S-PIM-NUM                                       
                                                                       
      TITLE 01  +11 SYSTIME      +1 'REPORT 3' +                       
                 +5 'SYSTEM'                                     
      TITLE 02  +25 ' COUNT BY PREFIX NUMBER'
      TITLE 03  ' '                                                   
                                                                       
      HEADING REC-CNT-O ('COUNT')                       
                                                                       
      LINE  01                   +                                     
               S-PIM-NUM +                                     
            +3  REC-CNT-O        +                                     
                 S-DEA-NUM                                       
                                                                       
     BEFORE-BREAK.  PROC.                                               
         IF LEVEL = 2                                                   
            DISPLAY   +20   '______  (TOTAL)'                           
         END-IF.                                                       
     END-PROC.                                                         
                                                                       
       TERMINATION. PROC.                                               
           DISPLAY ' '                                                 
           DISPLAY 'PROGRAM (PIMSCU02)'                                 
           DISPLAY +20 'END OF REPORT (R3)'                             
           DISPLAY ' '                                                 
       END-PROC.                       


This is my code and the error i am getting is as follows
Code:

PROGRAMS AND ALL SUPPORTING MATERIALS COPYRIGHT (C) 1982, 1996 BY COMPUTER ASSOC
FILE STATISTICS - CA-EASYTRIEVE PLUS 6.4 0202-11/16/10-21.59-SRT01492           
CUREIN           53,898    INPUT        SAM  FIX   BLK                 3700    2
SORTCUR          53,898   OUTPUT        SAM  FIX   BLK                 3700    2
  1500 *******A010 INVALID FILE REFERENCE - SORTCUR                             
11/16/10 21.59.43                             CA-EASYTRIEVE PLUS-6.4 0202       
                                                   KAISER PERMANENTE           
PROGRAMS AND ALL SUPPORTING MATERIALS COPYRIGHT (C) 1982, 1996 BY COMPUTER ASSOC
FILE STATISTICS - CA-EASYTRIEVE PLUS 6.4 0202-11/16/10-21.59-METRICS           
PARMLIST              4   OUTPUT        SAM  FIX   BLK         ASA      132     
REPORT3               0   OUTPUT        SAM  FIX   BLK         ASA      133    2
PIMSCU0A              1    INPUT        SAM  FIX   BLK                   80    2
SORTCUR               0    INPUT        SAM  FIX   BLK                 3700    2
CUREOUT               0   OUTPUT        SAM  FIX   BLK                 3700    2
EZTR001               0   OUTPUT        VFM  FIX   BLK                   17     
       *******A014 PREMATURE TERMINATION DUE TO PREVIOUS ERROR(S)       


Please do correct me if i am wrong.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


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

PostPosted: Wed Nov 17, 2010 7:21 pm
Reply with quote

Quote:

This is my code and the error i am getting is as follows


That is not ALL of your code. How do you expect us to give you a solution by only giving a snapshot.
Hint : your first step (i assume a sort step) is already going down the drain.
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: Wed Nov 17, 2010 8:31 pm
Reply with quote

Hello,

And i see none of the requested sample input/output data. . .

I suspect the a010 is because a field that is not available is referenced. . .

As written, i suspect this code will not work. . .
Back to top
View user's profile Send private message
jegan_selvan

New User


Joined: 23 Oct 2006
Posts: 24
Location: India

PostPosted: Wed Dec 15, 2010 12:04 pm
Reply with quote

Thanks for all your inputs. Atlast i am able to code my requirement and run fine.

Thanks,

Jegan S
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: Wed Dec 15, 2010 8:24 pm
Reply with quote

Good to hear it is working.

What was the problem and the fix?

Posting the resolution will probably help someone else with a similar problem one day. . .

d
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 -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts To get the count of rows for every 1 ... DB2 3
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top