In order to provide the ultimate in flexibility and adaptability, the selection of data sets for backup and restore can be accomplished using the FAVER2 Application Programmer Interface (API). FAVER2 provides execs that you can call from your own execs in order to make comprehensive backup/restore decisions. FAVER2 API also includes several general purpose execs you can use to create custom reports. And you can build your own interfaces to other products that provide execs and/or REXX ADDRESS environments.
FAVER2 Execs and USER Execs
There are two types of execs within FAVER2. We describe the two types as FAVER2 execs and USER execs.
FAVER2 execs are those that are already created for you within FAVER2. You just call the desired exec and it will perform that function. For example, the F2STORE exec performs the store function. Using the various parameters with each exec enables you to determine the specifics of what that exec will do.
USER execs are those that you create. Using the power of REXX, you can create execs that can do just about anything within FAVER2. Once you create an exec, you can call it like any of the FAVER2 execs to perform that function. Some examples of user execs are shown in Chapter 8, "CA-FAVER2 Toolkit" of the CA-FAVER 2 for VSE User Guide
Component: FAVER2
Executing the Execs
/* F2NOTEXP */
CALL F2VTOC VOLSER
IF RESULT > 0 THEN EXIT RESULT
YEAR = SUBSTR(DATE('S'),1,2)
DO NUMBER = 1 TO &VTOC.0
EXPIRE_DATE = YEAR||&VTOC.F1EXPDT.NUMBER
EXPIRE_DATE = DATE('B',EXPIRE_DATE)
IF EXPIRE_DATE > DATE ('B') & &VTOC.F1FTYPE.NUMBER='SAM' THEN DO
CALL F2STORE
'VOL('||VOLSER||')DSN('||&VTOC.F1DSN.NUMBER||')'
IF RESULT > 4 THEN EXIT RESULT
END
END
CALL F2PRINT
CALL F2XREF
EXIT 0
Each of the FAVER2 execs are described in Chapter 5 "CA-FAVER2 API Reference" of the Faver 2 for VSE User Guide.