SET219H
* =======================================================
* Process ........: SET_219
* Function .......: SET219H
* Created on .....: 7th November, 2001
* Description ....: Called example -> Get Employee Detail
* Version.........: 1
* Full Description:
* This function is called by SET219G. As arguments it
* receives an OS/400 command. It only returns messages
* back to SET219G.
* =======================================================
* ============== D E F I N I T I O N S ================
* =======================================================
Function Options(*LIGHTUSAGE *DIRECT)
Define Field(#COMMAND) Type(*CHAR) Length(256) Label('OS/400 Command')
* =======================================================
* ================ M A I N L O G I C ===============
* =======================================================
*
* Get the command that is to be executed
*
Execute Subroutine(GET_ALPHA) With_Parms(COMMAND *BLANKS 1 #COMMAND)
*
* Clear the return value list as nothing
* other than messages goes back to SET219G
*
Execute Subroutine(CLEAR_ARGS)
*
* Execute the command
*
Exec_Os400 Command(#COMMAND) If_Error(ERR)
*
* IF we reach here it executed with no errors
*
Message Msgtxt('Command execution completed normally.')
Return
*
* If we come here the command failed
*
ERR: Message Msgtxt('Command execution FAILED. See previous messages for details.')
Return
*
* =======================================================
* ======== C O M M O N S U B R O U T I N E S =========
* =======================================================
* This set of subroutines are simple interfaces to RDML
* function SET219Y. They can be copied from this function
* and used in other similar functions unchanged.
* =======================================================
* -------------------------------------------------------
* Use CLEAR_Args to clear the current set of values
* -------------------------------------------------------
Subroutine Name(CLEAR_ARGS)
Execute Subroutine(CALL_219Y) With_Parms(CLEAR)
Endroutine
* -------------------------------------------------------
* Use GET_ALPHA to return an alphanumeric value
* -------------------------------------------------------
Subroutine Name(GET_ALPHA) Parms((#S_219NAM1 *RECEIVED) (#S_219NAM2 *RECEIVED) (#S_219NAMI *RECEIVED) #S_219AVAL)
Execute Subroutine(CALL_219Y) With_Parms(GETALP)
Endroutine
* -------------------------------------------------------
* CALL_219Y is used to consolidate calls to SET219Y
* -------------------------------------------------------
Subroutine Name(CALL_219Y) Parms((#S_219OPER *RECEIVED))
Exchange Fields(#S_219OPER #S_219NAM1 #S_219NAM2 #S_219NAMI #S_219AVAL #S_219NVAL #S_219HOST #S_219FUNC)
Call Process(*DIRECT) Function(SET219Y)
Endroutine
* =======================================================
* Process ........: SET_219
* Function .......: SET219H
* Created on .....: 7th November, 2001
* Description ....: Called example -> Get Employee Detail
* Version.........: 1
* Full Description:
* This function is called by SET219G. As arguments it
* receives an OS/400 command. It only returns messages
* back to SET219G.
* =======================================================
* ============== D E F I N I T I O N S ================
* =======================================================
Function Options(*LIGHTUSAGE *DIRECT)
Define Field(#COMMAND) Type(*CHAR) Length(256) Label('OS/400 Command')
* =======================================================
* ================ M A I N L O G I C ===============
* =======================================================
*
* Get the command that is to be executed
*
Execute Subroutine(GET_ALPHA) With_Parms(COMMAND *BLANKS 1 #COMMAND)
*
* Clear the return value list as nothing
* other than messages goes back to SET219G
*
Execute Subroutine(CLEAR_ARGS)
*
* Execute the command
*
Exec_Os400 Command(#COMMAND) If_Error(ERR)
*
* IF we reach here it executed with no errors
*
Message Msgtxt('Command execution completed normally.')
Return
*
* If we come here the command failed
*
ERR: Message Msgtxt('Command execution FAILED. See previous messages for details.')
Return
*
* =======================================================
* ======== C O M M O N S U B R O U T I N E S =========
* =======================================================
* This set of subroutines are simple interfaces to RDML
* function SET219Y. They can be copied from this function
* and used in other similar functions unchanged.
* =======================================================
* -------------------------------------------------------
* Use CLEAR_Args to clear the current set of values
* -------------------------------------------------------
Subroutine Name(CLEAR_ARGS)
Execute Subroutine(CALL_219Y) With_Parms(CLEAR)
Endroutine
* -------------------------------------------------------
* Use GET_ALPHA to return an alphanumeric value
* -------------------------------------------------------
Subroutine Name(GET_ALPHA) Parms((#S_219NAM1 *RECEIVED) (#S_219NAM2 *RECEIVED) (#S_219NAMI *RECEIVED) #S_219AVAL)
Execute Subroutine(CALL_219Y) With_Parms(GETALP)
Endroutine
* -------------------------------------------------------
* CALL_219Y is used to consolidate calls to SET219Y
* -------------------------------------------------------
Subroutine Name(CALL_219Y) Parms((#S_219OPER *RECEIVED))
Exchange Fields(#S_219OPER #S_219NAM1 #S_219NAM2 #S_219NAMI #S_219AVAL #S_219NVAL #S_219HOST #S_219FUNC)
Call Process(*DIRECT) Function(SET219Y)
Endroutine