全部博文(287)
分类: 系统运维
2011-04-20 10:43:06
调用QUSRJOBI,显示当前Job Number(RPGIV例子)
d RtvJobInf Pr ExtPgm( 'QUSRJOBI' )
d JiRcvVar 32767a Options( *VarSize )
d JiRcvVarLen 10i 0 Const
d JiFmtNam 8a Const
d JiJobNamQ 26a Const
d JiJobIntId 16a Const
d JiError 32767a Options( *NoPass:*VarSize )
d JiRstStc 1a Options( *NoPass )
*
d Format100 ds
d S_ReturnLen 10i 0
d S_GetLen 10i 0
d C_JobName 10
d C_UsrName 10
d C_JobNum 6
d C_InJobID 16
d C_JobStatus 10
d C_JobType 1
d C_JobSubType 1
d C_Other 26
*
d S_Len s 5s 0
d C_ErrorCode s 32767a
*
/free
S_Len = %len(Format100) ;
callp RtvJobInf(Format100 :
S_Len :
'JOBI0100' :
'*' :
'' :
C_ErrorCode) ;
*inlr = *on ;
return ;
/end-free
debug结果:
> EVAL Format100
S_RETURNLEN OF FORMAT100 = 75
S_GETLEN OF FORMAT100 = 86
C_JOBNAME OF FORMAT100 = 'XCPINGYA'
C_USRNAME OF FORMAT100 = '1 XCPINGY '
C_JOBNUM OF FORMAT100 = ' 181745'
C_INJOBID OF FORMAT100 = ' t m +> 0 0 '
C_JOBSTATUS OF FORMAT100 = '*ACTIVE '
C_JOBTYPE OF FORMAT100 = ' '
C_JOBSUBTYPE OF FORMAT100 = ' '
C_OTHER OF FORMAT100 = 'I } '
当前jobnumber:
C_JOBNUM OF FORMAT100 = ' 181745'
内部JobId:
' t m +> 00'