View previous topic :: View next topic
|
Author |
Message |
jegan_selvan
New User
Joined: 23 Oct 2006 Posts: 24 Location: India
|
|
|
|
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 |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
I have the feeling you asked this already in other words. |
|
Back to top |
|
|
jegan_selvan
New User
Joined: 23 Oct 2006 Posts: 24 Location: India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
So what does it say in the product manuals on how to do this. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
jegan_selvan
New User
Joined: 23 Oct 2006 Posts: 24 Location: India
|
|
|
|
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 |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
jegan_selvan
New User
Joined: 23 Oct 2006 Posts: 24 Location: India
|
|
|
|
Thanks for all your inputs. Atlast i am able to code my requirement and run fine.
Thanks,
Jegan S |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|