I have used the QUSLSPL API for listing spool files using the output queue parameter and user name parameter with no issues. This is for format SPLF0300. I now need to use the optional parameter of the qualified job name. I want to return all the spool files for a specific job name. I keep getting errors with it. My data structure looks this:
================================================== ========
D QUSLSPL PR extpgm('QUSLSPL')
?* required parameters
D UsrSpc 20A const
D Format 8A const
D UserName 10A const
D QualOutQ 20A const
D FormType 10A const
D UserData 10A const
?* optional group 1:
D ErrorCode 32766A options(*nopass: *varsize)
?* optional group 2:
D QualJob 26A options(*nopass) const
D FieldKeys 10I 0 options(*nopass: *varsize)
D dim(9999)
D NumFields 10I 0 options(*nopass) const
?* optional group 3:
D AuxStgPool 10I 0 options(*nopass) const
?* optional group 4:
D JobSysName 8A options(*nopass) const
D StartCrtDate 7A options(*nopass) const
D StartCrtTime 6A options(*nopass) const
D EndCrtDate 7A options(*nopass) const
D EndCrtTime 6A options(*nopass) const
================================================== ========
When I try to just include the qualified job name parameter into my call I get a number of parameters not valid error. If I include the field keys and number of fields then I get a number of fields not valid error. I don't want any key fields, I just want the list to return the spool files for the specific job in spool file number order as the API documentation says it will. Here is my call without the key field and number of fields parameters:
quslspl(myspace:
'SPLF0300':
'*ALL':
'*ALL':
'*ALL':
'*ALL':
ApiError:
qual_job);
This give me a hard error and stops the program. If I include the field keys and number of field parameters I don't get the hard error but do get CPF34C0 returned to the error parameter:
quslspl(myspace:
'SPLF0300':
'*ALL':
'*ALL':
'*ALL':
'*ALL':
ApiError:
qual_job:
spl_keyfld:
spl_key#);
I've tried all kind of combinations in the key parameters from a valid key field (205) with number of fields = 1 to zero in each. Just cannot get it out of an error condition.
What am I missing here? And sorry but I cannot for the life of me remember how to embed code here.
Thanks in advance!!!!
================================================== ========
D QUSLSPL PR extpgm('QUSLSPL')
?* required parameters
D UsrSpc 20A const
D Format 8A const
D UserName 10A const
D QualOutQ 20A const
D FormType 10A const
D UserData 10A const
?* optional group 1:
D ErrorCode 32766A options(*nopass: *varsize)
?* optional group 2:
D QualJob 26A options(*nopass) const
D FieldKeys 10I 0 options(*nopass: *varsize)
D dim(9999)
D NumFields 10I 0 options(*nopass) const
?* optional group 3:
D AuxStgPool 10I 0 options(*nopass) const
?* optional group 4:
D JobSysName 8A options(*nopass) const
D StartCrtDate 7A options(*nopass) const
D StartCrtTime 6A options(*nopass) const
D EndCrtDate 7A options(*nopass) const
D EndCrtTime 6A options(*nopass) const
================================================== ========
When I try to just include the qualified job name parameter into my call I get a number of parameters not valid error. If I include the field keys and number of fields then I get a number of fields not valid error. I don't want any key fields, I just want the list to return the spool files for the specific job in spool file number order as the API documentation says it will. Here is my call without the key field and number of fields parameters:
quslspl(myspace:
'SPLF0300':
'*ALL':
'*ALL':
'*ALL':
'*ALL':
ApiError:
qual_job);
This give me a hard error and stops the program. If I include the field keys and number of field parameters I don't get the hard error but do get CPF34C0 returned to the error parameter:
quslspl(myspace:
'SPLF0300':
'*ALL':
'*ALL':
'*ALL':
'*ALL':
ApiError:
qual_job:
spl_keyfld:
spl_key#);
I've tried all kind of combinations in the key parameters from a valid key field (205) with number of fields = 1 to zero in each. Just cannot get it out of an error condition.
What am I missing here? And sorry but I cannot for the life of me remember how to embed code here.
Thanks in advance!!!!
Comment