Configuring an RPF to create and File Master under BTSO Under CA Roscoe

Document ID : KB000026333
Last Modified Date : 14/02/2018
Show Technical Document Details

Introduction: 

Customer needs sample to implementation file master under BTSO via STC (RPF plus JCL in proclib).

Instructions:

Customize and save this RPF.  Running this RPF with create and invoke BTSO:

 <<FILEMSTR>>
:*-------------------------------------------------------------------*
:*                      CA-ROSCOE BTSO FACILITY                      *
:*                                                                   *
:*  This RPF creates the BTSO job stream and calls RTBETSO to        *
:*  invoke BTSO.  This RPF is distributed as a sample only.          *
:*-------------------------------------------------------------------*
PUSH                                    : Save user session settings
SET ATTACH NOPAUSE                   : Put us in NOPAUSE mode
TRAP ON
CREATE AWS TEMP LEVEL NONRECOVERABLE    : Create a temp workspace
TRAP OFF
IF (S.TC NE 0)                          : Create failed
 RESPONSE 'UNABLE TO CREATE TEMP AWS FOR BTSO PROCESSING'
 GOTO <<RETURN>>
ENDIF
:*---------------------- --------------------------------------------*
:*  VERIFY ISPPROF                                                   *
:*-------------------------------------------------------------------*
TRAP ON
 + INFO D DD.FILEMSTR.+S.KEY+.BTSO.ISPPROF NODSPLY
TRAP OFF
IF S.TC NE 0
 ALLOCATE
  +DD1 DSN=DD.FILEMSTR.+S.KEY+.BTSO.ISPPROF DISP=(NEW,CATLG)
    UNIT=SYSDA SPACE=(TRK,(10,1,30))
    BLKSIZE=6160 LRECL=80 RECFM=FB
 ENDALLOC
 FREE ALL
ENDIF
:*-------------------------------------------------------------------*
:*  WRITE JOB STREAM TO AWS                                          *
:*-------------------------------------------------------------------*
WRITE AWS B                          : Now add appl specific code
'PGM=ISPF(CP)'
'PROC=BTSOFILE'                      : PROC NAME (PROCLIB)
'PROCPARM=USERID='|SUBSTR(S.KEY 1 8)
'*PROCPARM=TRACE=TRACE'
ENDWRITE
:*-------------------------------------------------------------------*
:*  At this point the job stream is in the AWS, code may be added    *
:*  to make any final modifications to the JCL...                    *
:*-------------------------------------------------------------------*
:*-------------------------------------------------------------------*
:*-------------------------------------------------------------------*
:*  Invoke BTSO by allocating JCL DD to the AWS and calling RTBETSO  *
:*-------------------------------------------------------------------*
ALLOC JCL AWS
: ALLOC BTSTRACE MEM=BTSTRACE
CALL RTBETSO   'CMD(%CAWAFM)'
:*
FREE JCL
: FREE BTSTRACE
IF (S.RC NE 0)
 ? 'RETURN CODE = '|S.RC|' FROM BTSO'
ENDIF
TRAP ON
 D D
TRAP OFF
RETURN

In your PROCLIB save BTSOFILE member.

//BTSOFILE PROC BTSOCNTL='',USERID='' 
//STEP1    EXEC PGM=RTBBATCH,DYNAMNBR=256,REGION=0M, 
//         PARM='BTSOCNTL=&BTSOCNTL,USERID=&USERID' 
//STEPLIB  DD  DSN=CA.FILEMSTR.V410309.SEAGALT,DISP=SHR 
//         DD  DSN=SYSP.ROSCOE.V60SP12.RO60LIB,DISP=SHR 
//         DD  DSN=CA.ROSCOE.MVSF.EXIT,DISP=SHR 
//         DD  DSN=CA.FILEMSTR.V410309.CAILIB,DISP=SHR 
//SDSFMENU DD  DISP=SHR,DSN=ISF.SISFPLIB 
//HASPINDX DD  DISP=SHR,DSN=ISF.HASPINDX 
//SYSPROC  DD   DISP=SHR,DSN=ISP.SISPCLIB 
//         DD   DISP=SHR,DSN=CA.FILEMSTR.V410309.CAISRC   * SYSPROC 
//SYSEXEC  DD   DISP=SHR,DSN=CA.FILEMSTR.V410309.CAISRC   * SYSPROC 
//* 
//*MOROCCO  DD   DUMMY 
//SYSUDUMP DD   DUMMY 
//* 
//* 
//SYSHELP  DD DSN=SYS1.HELP,DISP=SHR 
//SYSLBC   DD DSN=SYS1.BRODCAST,DISP=SHR 
//ISPFLOG1  DD DUMMY 
//SYSPRINT DD  SYSOUT=(*,TERM) 
//SYSTERM  DD  SYSOUT=(*,TERM) 
//SYSOUT   DD  SYSOUT=(*,TERM) 
//* 
//ISPLLIB  DD   DISP=SHR,DSN=ISP.SISPLOAD 
//         DD   DISP=SHR,DSN=ISF.SISFLOAD 
//         DD   DISP=SHR,DSN=CA.FILEMSTR.V410309.CAILIB   * ISPLLIB 
//* 
//ISPMLIB  DD   DISP=SHR,DSN=ISP.SISPMENU 
//         DD   DISP=SHR,DSN=ISF.SISFMLIB 
//         DD   DISP=SHR,DSN=CA.FILEMSTR.V410309.CAIISPM  * ISPMLIB 
//ISPPLIB  DD   DISP=SHR,DSN=ISP.SISPPENU 
//         DD   DISP=SHR,DSN=ISF.SISFPLIB 
//         DD   DISP=SHR,DSN=CA.FILEMSTR.V410309.CAIISPP  * ISPPLIB 
//ISPSLIB  DD   DISP=SHR,DSN=ISP.SISPSLIB 
//*****    DD   DISP=SHR,DSN=ISP.SISPSENU 
//         DD   DISP=SHR,DSN=CA.FILEMSTR.V410309.CAIISPS  * ISPSLIB 
//ISPTLIB  DD   DISP=SHR,DSN=ISF.SISFTLIB 
//         DD   DISP=SHR,DSN=ISP.SISPTENU 
//         DD   DISP=SHR,DSN=CA.FILEMSTR.V410309.CAIISPT  * ISPTLIB 
//* 
//ISPPROF  DD   DSN=DD.FILEMSTR.&USERID..BTSO.ISPPROF,DISP=SHR 
//ISPTABL  DD   DSN=DD.FILEMSTR.&USERID..BTSO.ISPPROF,DISP=SHR 
//* 
//*BTSOCNT

Additional Information:

For additional information about implementing the BTSO facility, see Chapter 15. BTSO in the CA-Roscoe Interactive Environment - System Reference Guide