Function SET210A
* =======================================================
* Process ........: SET_210
* Function .......: SET210A
* Created on .....: 02/10/01 at 12:12:37
* Description ....: Check a partition for level checks
* Version.........: 1
*
* Full Description: The purpose of this function is to
* submit a job that uses DSPPGMREF & DSPFD (*RCDFMT)
* to compare the record format ids in io module
* references to physical & logical files, with the
* record format ids of those physical and logical files
*
*
* Disclaimer: The following material is supplied as
* sample material only. No warranty concerning the
* material or its use in any way whatsoever is
* expressed or implied.
*
* Minimum LANSA release: 8.0
*
* =======================================================
* Function control options
FUNCTION OPTIONS(*DIRECT)
*
* Group and field definitions
*
GROUP_BY NAME(#S_GRPREQ) FIELDS(#S_210IO1 #S_210IO2 #S_210PF1 #S_210PF2)
*
* Mainline
*
DEF_COND NAME(*AS400) COND('*CPUTYPE = AS400')
IF COND(*AS400)
ELSE
MESSAGE MSGTXT('Not available on PC')
MENU
ENDIF
*
* File IO modules can be in
* the partition data library,
* the partition module library,
* or both
*
* Physical and logical files are usually in
* the partition data library.
* But some sites store physical and logical files
* in other libraries
*
* #S_210IO1 & #S_210IO2 contain libraries that will
* be searched for IO module program references
* to files.
*
* #S_210PF1 & #S_210PF2 contain libraries that will
* be searched for physical and logical files.
*
IF COND('*PARTDTALIB *EQ *PARTPGMLIB')
CHANGE FIELD(#S_210IO1 #S_210PF1) TO(*PARTPGMLIB)
CHANGE FIELD(#S_210IO2 #S_210PF2) TO(*NULL)
ELSE
CHANGE FIELD(#S_210IO1 #S_210PF1) TO(*PARTDTALIB)
CHANGE FIELD(#S_210IO2) TO(*PARTPGMLIB)
CHANGE FIELD(#S_210PF2) TO(*NULL)
ENDIF
BEGIN_LOOP
*
L10: REQUEST FIELDS(#S_GRPREQ) IDENTIFY(*DESC)
*
* validate
*
BEGINCHECK
*
VALUECHECK FIELD(#S_210IO1) WITH_LIST(' ') IN_LIST(*ERROR) NOT_INLIST(*NEXT) MSGTXT('Must not be blank')
VALUECHECK FIELD(#S_210PF1) WITH_LIST(' ') IN_LIST(*ERROR) NOT_INLIST(*NEXT) MSGTXT('Must not be blank')
*
IF COND('#S_210IO1 *NE *BLANKS')
EXEC_OS400 COMMAND('CHKOBJ #S_210IO1 *LIB') IF_ERROR(L10)
ENDIF
IF COND('#S_210IO2 *NE *BLANKS')
EXEC_OS400 COMMAND('CHKOBJ #S_210IO2 *LIB') IF_ERROR(L10)
ENDIF
IF COND('#S_210PF1 *NE *BLANKS')
EXEC_OS400 COMMAND('CHKOBJ #S_210PF1 *LIB') IF_ERROR(L10)
ENDIF
IF COND('#S_210PF2 *NE *BLANKS')
EXEC_OS400 COMMAND('CHKOBJ #S_210PF2 *LIB') IF_ERROR(L10)
ENDIF
ENDCHECK
*
* Note that the libl, jobq, outq and msgq are all
* from the users job description.
*
CHANGE FIELD(#JOBNAME) TO(SET210XREF)
SUBMIT PGM(SET210) PARM(#S_210IO1 #S_210IO2 #S_210PF1 #S_210PF2) JOB(#JOBNAME) JOBD(*USRPRF)
MESSAGE MSGTXT('SET210XREF submitted to batch')
*
END_LOOP
* =======================================================
* Process ........: SET_210
* Function .......: SET210A
* Created on .....: 02/10/01 at 12:12:37
* Description ....: Check a partition for level checks
* Version.........: 1
*
* Full Description: The purpose of this function is to
* submit a job that uses DSPPGMREF & DSPFD (*RCDFMT)
* to compare the record format ids in io module
* references to physical & logical files, with the
* record format ids of those physical and logical files
*
*
* Disclaimer: The following material is supplied as
* sample material only. No warranty concerning the
* material or its use in any way whatsoever is
* expressed or implied.
*
* Minimum LANSA release: 8.0
*
* =======================================================
* Function control options
FUNCTION OPTIONS(*DIRECT)
*
* Group and field definitions
*
GROUP_BY NAME(#S_GRPREQ) FIELDS(#S_210IO1 #S_210IO2 #S_210PF1 #S_210PF2)
*
* Mainline
*
DEF_COND NAME(*AS400) COND('*CPUTYPE = AS400')
IF COND(*AS400)
ELSE
MESSAGE MSGTXT('Not available on PC')
MENU
ENDIF
*
* File IO modules can be in
* the partition data library,
* the partition module library,
* or both
*
* Physical and logical files are usually in
* the partition data library.
* But some sites store physical and logical files
* in other libraries
*
* #S_210IO1 & #S_210IO2 contain libraries that will
* be searched for IO module program references
* to files.
*
* #S_210PF1 & #S_210PF2 contain libraries that will
* be searched for physical and logical files.
*
IF COND('*PARTDTALIB *EQ *PARTPGMLIB')
CHANGE FIELD(#S_210IO1 #S_210PF1) TO(*PARTPGMLIB)
CHANGE FIELD(#S_210IO2 #S_210PF2) TO(*NULL)
ELSE
CHANGE FIELD(#S_210IO1 #S_210PF1) TO(*PARTDTALIB)
CHANGE FIELD(#S_210IO2) TO(*PARTPGMLIB)
CHANGE FIELD(#S_210PF2) TO(*NULL)
ENDIF
BEGIN_LOOP
*
L10: REQUEST FIELDS(#S_GRPREQ) IDENTIFY(*DESC)
*
* validate
*
BEGINCHECK
*
VALUECHECK FIELD(#S_210IO1) WITH_LIST(' ') IN_LIST(*ERROR) NOT_INLIST(*NEXT) MSGTXT('Must not be blank')
VALUECHECK FIELD(#S_210PF1) WITH_LIST(' ') IN_LIST(*ERROR) NOT_INLIST(*NEXT) MSGTXT('Must not be blank')
*
IF COND('#S_210IO1 *NE *BLANKS')
EXEC_OS400 COMMAND('CHKOBJ #S_210IO1 *LIB') IF_ERROR(L10)
ENDIF
IF COND('#S_210IO2 *NE *BLANKS')
EXEC_OS400 COMMAND('CHKOBJ #S_210IO2 *LIB') IF_ERROR(L10)
ENDIF
IF COND('#S_210PF1 *NE *BLANKS')
EXEC_OS400 COMMAND('CHKOBJ #S_210PF1 *LIB') IF_ERROR(L10)
ENDIF
IF COND('#S_210PF2 *NE *BLANKS')
EXEC_OS400 COMMAND('CHKOBJ #S_210PF2 *LIB') IF_ERROR(L10)
ENDIF
ENDCHECK
*
* Note that the libl, jobq, outq and msgq are all
* from the users job description.
*
CHANGE FIELD(#JOBNAME) TO(SET210XREF)
SUBMIT PGM(SET210) PARM(#S_210IO1 #S_210IO2 #S_210PF1 #S_210PF2) JOB(#JOBNAME) JOBD(*USRPRF)
MESSAGE MSGTXT('SET210XREF submitted to batch')
*
END_LOOP