View - JCL to Submit SARBCH /PRINT for Reports
search cancel

View - JCL to Submit SARBCH /PRINT for Reports

book

Article ID: 145107

calendar_today

Updated On:

Products

Deliver View

Issue/Introduction

Users want to send reports, that are archived in View, to another LPAR to download to a server.

Resolution

Below SARGRW utility program can be used to send reports to any destination:

/CONTROL RULER=NO LINECNT=2000 LINESIZE=80
/DEFINE MYRID CHAR(32)
/DEFINE MYID CHAR(8)
/DEFINE MYDSN CHAR(44)
/DEFINE MYEXE CHAR(80)
/DEFINE MYSEL CHAR(80)
/DEFINE I BIN(4)
/IF ID = "XXXXXXXXXXXX"
/ OUTPUT "//PRTJOB01 JOB XXXXXXXXXXXX," COL(1)
/ OUTPUT "// CLASS=Y,MSGCLASS=X,NOTIFY=XXXXXXXX" COL(1)
/ SET I = I + 1
/ SET MYRID = ID
/ SET MYEXE = "//STEP"||I||" EXEC PGM=SARBCH,PARM=('"||DATABASE||"')"
/ OUTPUT MYEXE COL(1)
/ OUTPUT "//SYSPRINT DD SYSOUT=(,)" COL(1)
/ OUTPUT "//REPORT DD SYSOUT=(,)" COL(1)
/ OUTPUT "//SYSIN DD *" COL(1)
/ SET MYSEL = "/PRINT ID="||MYRID||" GEN="||GEN||" SEQ="||SEQ||"
/ OUTPUT MYSEL COL(1)
/ OUTPUT " BANNER=* CLASS=X DEST=XXXXXXXX.XXXXXXXX FORM=FFFF" COL(1)
/ OUTPUT "/*" COL(1)
/END