View previous topic :: View next topic
|
Author |
Message |
Arjun1703
New User
Joined: 28 Apr 2021 Posts: 1 Location: India
|
|
|
|
Hi All,
Kindly help in achieving the below result.
Requirement: Print the same report for each record from multiple input files.
Details:
File 1 :
RECORD1
RECORD2
RECORD3
File 2:
RECORDA
RECORDB
RECORDC
Required output in an output file:
***HEADER***
RECORD1 + RECORDA
RECORD2 + RECORDB
RECORD3 + RECORDD
* * * * * END OF REPORT * * * * *
Currently, my output is:
***HEADER***
RECORD1 + RECORDA
* * * * * END OF REPORT * * * * *
The second and third records are not printing with the below code:
JOB INPUT NULL
GET FILE1
DO WHILE NOT EOF FILE1
GET FILE2
PRINT REPORT1
PRINT REPORT2
GET FILE1
END-DO
STOP
REPORT REPORT1 PAGESIZE 064 LINESIZE 50 PRINTER JJOUT
TITLE 1 COL 1 '***HEADER***'
LINE 1 ' '
REPORT REPORT2 PAGESIZE 064 LINESIZE 50 PRINTER JJOUT
TITLE 1 COL 1 IP-FILE1 ' + ' IP-FILE2
LINE 1 ' '
TERMINATION. PROC
*================
DISPLAY COL 1 '* * * * * END OF REPORT * * * * *'
END-PROC
Version: Easytrieve 11.6 |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2022 Location: USA
|
|
|
|
I cannot find any clue: how on the Earth the two sequential statements (in any language)
Code: |
PRINT REPORT1
PRINT REPORT2 |
may be able to produce one line of output like this one:
when both REPORTS are defined as separate ones?
Where is any attempt to concatenate two lines from two different sources? How any super-sophisticated product can guess what you really need?
The one line of output you demonstrated seems to be the result of your statement
Code: |
TITLE ...... ‘+’ ..... |
|
|
Back to top |
|
|
|