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
 

 

Record Count and Report printing in EZT

 
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: Tue Nov 16, 2010 5:30 pm    Post subject: Record Count and Report printing in EZT
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: 2433
Location: Netherlands, Amstelveen

PostPosted: Tue Nov 16, 2010 7:09 pm    Post subject:
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    Post subject: Reply to: Record Count and Report printing in EZT
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: 8593
Location: Back in jolly old England

PostPosted: Tue Nov 16, 2010 8:09 pm    Post subject:
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

Site Director


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

PostPosted: Tue Nov 16, 2010 9:49 pm    Post subject:
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    Post subject: Reply to: Record Count and Report printing in EZT
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: 2433
Location: Netherlands, Amstelveen

PostPosted: Wed Nov 17, 2010 7:21 pm    Post subject:
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

Site Director


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

PostPosted: Wed Nov 17, 2010 8:31 pm    Post subject:
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    Post subject: Reply to: Record Count and Report printing in EZT
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

Site Director


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

PostPosted: Wed Dec 15, 2010 8:24 pm    Post subject: Reply to: Record Count and Report printing in EZT
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    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 Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm


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