I am running reports using the IBATCH jcl that came with our WebFocus 715 installation. I noticed that whenever a report creates a hold file and uses that hold file for another TABLE FILE request, it fails because it cannot find the previous hold file that was created. The error was (FOC36219) AN ERROR OCCURED WHEN OPENING FILE: ATTPF2. When I run the same report in DevStudio, it runs fine.
It appears that when running in batch mode using the IBATCH jcl (which uses TSCOM300 -t), the hold file does not get saved, therefore it could not be referenced later on in the report.
Is there a switch or SET command that can be used to fix this, or does this mean that I have to DYNAMICALLY ALLOCATE each hold file so it can be referenced later on? I hope the answer would not be -- you cannot use hold files when running in batch mode.
Please help.
SOUCE CODE:
-----------
-SET &ECHO=ALL;
-RUN
TABLE FILE CAR
PRINT COUNTRY CAR MODEL RETAIL_COST
ON TABLE HOLD AS CARLIST
END
-RUN
TABLE FILE CARLIST
PRINT COUNTRY CAR
BY COUNTRY NOPRINT
END
-RUN
SYSOUT (using IBATCH jcl):
--------------------------
-RUN
TABLE FILE CAR
PRINT COUNTRY CAR MODEL RETAIL_COST
ON TABLE HOLD AS CARLIST
END
-RUN
0 NUMBER OF RECORDS IN TABLE= 18 LINES= 18
0 ERROR AT OR NEAR LINE 6 IN PROCEDURE test_batch_hold
(FOC36219) AN ERROR OCCURED WHEN OPENING FILE: CARLIST
TABLE FILE CARLIST
PRINT COUNTRY CAR
BY COUNTRY NOPRINT
END
-RUN
(FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: CARLIST
BYPASSING TO END OF COMMAND
>>
VIEW SOURCE (DevStudio):
------------------------
-RUN
TABLE FILE CAR
PRINT COUNTRY CAR MODEL RETAIL_COST
ON TABLE HOLD AS CARLIST
END
-RUN
0 NUMBER OF RECORDS IN TABLE= 18 LINES= 18
TABLE FILE CARLIST
PRINT COUNTRY CAR
BY COUNTRY NOPRINT
END
-RUN
0 NUMBER OF RECORDS IN TABLE= 18 LINES= 18
Thanks,
Ronnel C
WebFocus 7.1.5
IBM ZOS 1.6