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

Print report for each record from multiple input files


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

New User


Joined: 28 Apr 2021
Posts: 1
Location: India

PostPosted: Wed Apr 28, 2021 4:11 am
Reply with quote

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
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2022
Location: USA

PostPosted: Wed Apr 28, 2021 5:58 pm
Reply with quote

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:
Code:
RECORD1 + RECORDA

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
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
Search our Forums:

Back to Top