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

Easytrieve - Report writing - Only 1 REPORT para executing.


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

New User


Joined: 14 Dec 2011
Posts: 17
Location: India

PostPosted: Wed Sep 14, 2016 11:40 am
Reply with quote

Hello!

I am writing a report using REPORT writing functionality of easytrieve.

1) One output file, multiple REPORT paragraphs

REPORT REPORT1 PRINTER OUTPUTF1 <other parameters>
LINE 01 <VARIABLES>

REPORT REPORT2 PRINTER OUTPUTF1 <other parameters>
LINE 01 <OTHER VARIABLES>

REPORT REPORT3 PRINTER OUTPUTF1 <other parameters>
LINE 01 <SOME OTHER VARIABLES>

Above REPORT paragraphs are printed on different conditions to a same output file.

The problem is, OUTPUTF1 has records from only first REPORT paragraph. In above case records from only REPORT1 are printed to OUTPUTF1. If REPORT2 paragraph is moved above REPORT1 then records from only REPORT2 are printed to OUTPUTF1.

Thanks!
Back to top
View user's profile Send private message
Abhi Nature

New User


Joined: 14 Dec 2011
Posts: 17
Location: India

PostPosted: Wed Sep 14, 2016 12:33 pm
Reply with quote

Okay. This was interesting!

From the manual - ...if another report is already using the associated
print file, the PRINT statement outputs data to a work file that is spooled
until the associated JOB activity processing is complete

Therefore, the data from second REPORT paragraphs and further was spooled to a work file since multiple REPORT paragraphs were writing to same output file. Only first REPORT paragraph was directly writing to output file. This paragraph was holding the output file. Once JOB activity was completed, spooled data from work files should supposedly write to output file. This was not happening.

Spooled data from work files in my case was not writing to output file! The reason - I was using STOP EXECUTE! STOP EXECUTE immediately terminates all easytrieve function. This implies that writing spooled data from work files is yet another JOB activity, an internal one. Only writing STOP worked - it terminates only the current activity.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Sep 14, 2016 4:55 pm
Reply with quote

Yes, STOP EXECUTE will do that. It is for error situations. To just get on with the next thing, you use STOP.

If you add a SEQUENCE to each report, you will get no report output with STOP EXECUTE.

In your existing case, note that you would not get totals at the end of the report.
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 Executing DB2 SQL store procedure via... DB2 0
No new posts Overwriting SSN Digits in Easytrieve ... CA Products 0
No new posts Two input files & writing counter... DFSORT/ICETOOL 12
This topic is locked: you cannot edit posts or make replies. Programa para Realiza Operaciones sob... JCL & VSAM 3
No new posts Need help on formatting a report DFSORT/ICETOOL 14
Search our Forums:

Back to Top