book
Article ID: 126685
calendar_today
Updated On:
Feedback
Subscribe
Issue/Introduction
The client wants to offload reports from their View database, to physical sequential files.
Resolution
The fundamental process to move reports from CA View to a Windows Server is as follows: . Use SARBCH /PRINT to print a report to JES: /PRINT ID=xxxxxxxxxxxx GEN=nnnnn SEQ=nnnnn VIEW=0 BANNER=* CLASS=x DEST=xxxxxxxx ADDRESS=('FILENAME=ReportID_Archdate_Archtime.yyy') . Above: . . CLASS=x and DEST=xxxxxxxx match criteria for a CA Spool task, which will pick up the report. . . "yyy" can be PDF if to be a PDF file, or TXT if to be a .txt file. . In CA Spool would appear the following definitions: DEFNODE FTPXX,THING,GROUP=1,ACQUIRE=WORK,RELEASE=NOWORK, CLASS=ALL,SEP=0,PURGE=NO,TCPHOST=FTP_Server, TCPDRIV=FTP,TCPPORT=21 NODE dest,FTPAL,LOCATION=location, DRIVPRM1='DSNAME=xxxxxx.FTPsysid.sysid2.&FNO', DRIVPRM2='PATH=/Temp/,FILENAME=&FNM.yyy', DRIVPRM3='FTPUSER=FTP_user,FTPPASS=psw' . The CA Spool FTPDRIVER, will transfer the file to the FTP Server, under name: c:/temp/ReportID_Archdate_Archtime.yyy ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- The SARBCH transactions, to extract the reports, can be created using a SARGRW program similar to the following: //XXXXXXXX JOB ... //* //SARGRW01 EXEC PGM=SARGRW //STEPLIB DD DISP=SHR,DSN=VIEW.CVDELOAD <=== Modify, if used //SYSPRINT DD SYSOUT=* //PRTFILE DD SYSOUT=* //OUTFILE DD DISP=(,CATLG,DELETE), // DSN=xxxxxx.xxxxxx.SARGRWOP, // DCB=(RECFM=xx,LRECL=nnn,BLKSIZE=nnnnn), // SPACE=(CYL,(nn,nn),RLSE), // UNIT=xxxx,VOL=SER=xxxxxx //SYSIN DD * /CONTROL SEQ=RID DATABASE=view_hlq <=== Modify DB name /IF SUBSTR(RID,1,1) EQ 'A' <=== Sample comparison for extraction / OUTPUT '/PRINT ID=' / OUTPUT "'"||RID||"'" / OUTPUT ' GEN='||CHAR(GEN) SKIP / OUTPUT ' SEQ='||CHAR(SEQ) SKIP / OUTPUT ' VIEW=0' SKIP / OUTPUT ' BANNER=*' SKIP / OUTPUT ' CLASS=I' SKIP / OUTPUT ' DEST=ANDYFTPF' SKIP / OUTPUT ' ADDRESS=(' SKIP / OUTPUT "'"||'FILENAME=' / OUTPUT SUBSTR(ID,1,8)||'_' / OUTPUT EDIT(ARCHDATE,'DDMMYYYY'||'_') / OUTPUT EDIT(ARCHTIME,'HHMMSS')||'.PDF'')' /END /* //