API QDMLOPNF open files
Last Post 22 Aug 2008 10:30 AM by Carsten Flensburg. 7 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
jamena
New Member
New Member
Posts:4

--
21 Aug 2008 05:45 PM
Actually I use the API QDMLOPNF, I want to retrieve some information from a some programs that are running in batch, I want to retrieve de RN, Relative Number from each of that pgms, when in my pgm send the values to Job Identification (OPNF100), I send JobName, UsrName, and JobNbr with a correct values, but when the pgm come back after call to LSTOPNF, in my structure APIerror, send me that one parameter is wrong, but if just leave one aster * in a jobname, the pgm run well but not retrieve the files from the user and job that I send, this retrieve files but from my sesion... any ideas why?? Thanks
Scott Klement
Editorial Staff Member
Editorial Staff Member
Posts:16313
Avatar

--
21 Aug 2008 06:18 PM Accepted Answer
Is your job identification parameter in the JIDF0100 format? Have you followed the instructions for each field in that format?
jamena
New Member
New Member
Posts:4

--
21 Aug 2008 07:17 PM Accepted Answer
YEs I follow: this are the job identification in my program * Job identification format OPNF0100: d jijobinf ds inz d jijobnam 10a inz('*') d jiusrnam 10a d jijobnbr 6a d jiintjobid 16a d 2a inz(*allx'00') d jithrind 10i 0 inz(1) d jithrid 8a inz( *allx'00') is this way it works, but I want to retrieve RN from jobs that are submit in qbatch. (in this example: retrieve my interactive job).
Michael Catalani
Basic Member
Basic Member
Posts:82

--
21 Aug 2008 07:32 PM Accepted Answer
Posting the code could help us see something that is blatantly wrong. Are you sure the internal job number does not get a value placed in it? It has to be blank if you are filling in the job / user/ number fields.
jamena
New Member
New Member
Posts:4

--
21 Aug 2008 08:15 PM Accepted Answer
Right, that parameter are contain blanks. my sources will be upload
Scott Klement
Editorial Staff Member
Editorial Staff Member
Posts:16313
Avatar

--
21 Aug 2008 08:16 PM Accepted Answer
Please see the following description of how to post code: http://forums.systeminetwork.com/is...hp?t=45452 I don't see any errors in your DS (but, the DS is very hard to read, so I might be missing one.) Can you tell us what's passed in this DS at the time the API is called?
jamena
New Member
New Member
Posts:4

--
21 Aug 2008 08:31 PM Accepted Answer
Thanks Scott JObnam= specific name that were submited USRNAM= all our jobs ran with the same user jobnr = to test that I get the rigth job I send the job number for just one job could you see my source attached.
Carsten Flensburg
Basic Member
Basic Member
Posts:97
Avatar

--
22 Aug 2008 10:30 AM Accepted Answer
Hello Jamena, If you try and specify the ERRC0100 data structure (ApiError) so that exception messages are returned directly to your job, it will be easier for you to get the full meaning of the returned error message. Here's an example of how this can be achieved:
 d apierror        ds
     d  Aebytprv                     10i 0 inz(0)
     d  Aebytavl                     10i 0 inz(0)
Telling the API that zero bytes are provided to communicate error events will cause the API to send an exception message, in case an error occurs. Here's how the message that I assume you got returned in the error data structure (in partial) looks when prompted in the joblog: [FONT="Courier New"] Message ID . . . . . . : CPF3C3B Severity . . . . . . . : 30 Date sent . . . . . . : 22-08-08 Time sent . . . . . . : 08:26:55 Message type . . . . . : Diagnostic Message . . . . : Value for parameter 4 for API QDMLOPNF not valid. Cause . . . . . : A value for a field in parameter 4 is not valid. The length of the invalid field is 4. The byte offset to the invalid field is 44. Recovery . . . : Correct the value for the field and try the request again. For a list of the allowable values for the field, see the APIs topic in the Information Center, http://www.ibm.com/eserver/iseries/infocenter. [/FONT] As you can see the message identifies parameter 4 (Job ID structure) as the cause of the problem, and the actual error to be caused by a field of length 4 and having an offset of 44 within the data structure. This in turn points to the Thread indicator structure subfield, which in your code is set to 1. According to the documentation this value indicates that the information is returned for the job in which the QDMLOPNF API runs, but it seems that you're after information in other jobs. I'd therefore suggest that you try and change the thread indicator value from 1 to [U]3[/U], which indicates that information should be returned for all threads within the actually specified job, irrespective of whether it's the current job or another. Please also note that retrieving information for another job requires *JOBCTL special authority in the user profile running the QDMLOPNF API. Best regards, Carsten Flensburg
You are not authorized to post a reply.

Acceptable Use Policy