I am trying to give my users the choice of running a report to a Mainframe printer (using OFFLINE PRINT) or viewing the report in the browser as a PDF file.
I included a runtime &variable called &OUTPUT. If the user enters anything in the input box, the report should be directed to an allocated PDS. Here is sample code:
-IF '&OUTPUT'.EXIST THEN GOTO LABEL1 ELSE GOTO LABEL2;
-LABEL1
OFFLINE CLOSE
-* define output PDS
DYNAM ALLOC F OFFLINE DA DEV.BCMSUMMA.DWLK SHR REU
-RUN
-LABEL2
I have similar code at the end of the report
-IF '&OUTPUT'.EXIST THEN GOTO LABEL3 ELSE GOTO LABEL4;
-LABEL4
ON TABLE PCHOLD FORMAT PDF.
-GOTO LABEL5
-LABEL3
OFFLINE CLOSE
-LABEL5
The problem I am having is checking &OUTPUT for a specific condition and having the branching logic go to the right place in the report.
Has anyone done something similar to this? Any and all help will be appreciated.
I included a runtime &variable called &OUTPUT. If the user enters anything in the input box, the report should be directed to an allocated PDS. Here is sample code:
-IF '&OUTPUT'.EXIST THEN GOTO LABEL1 ELSE GOTO LABEL2;
-LABEL1
OFFLINE CLOSE
-* define output PDS
DYNAM ALLOC F OFFLINE DA DEV.BCMSUMMA.DWLK SHR REU
-RUN
-LABEL2
I have similar code at the end of the report
-IF '&OUTPUT'.EXIST THEN GOTO LABEL3 ELSE GOTO LABEL4;
-LABEL4
ON TABLE PCHOLD FORMAT PDF.
-GOTO LABEL5
-LABEL3
OFFLINE CLOSE
-LABEL5
The problem I am having is checking &OUTPUT for a specific condition and having the branching logic go to the right place in the report.
Has anyone done something similar to this? Any and all help will be appreciated.