i want to get the last print file generated from a job which was created AFTER the time the program producing the print file ran. my methodology was to 1. rtvsysval qtime 2. execute the program 3. execute the api qusrspla 4. test the create time and determine if it was greater than the time i previously retrieved. i am having dififculties in getting the parameters coded and the on-line help does not provide an example i can use
Software/Hardware used:
cl
ASKED:
February 11, 2010 3:55 PM
UPDATED:
February 12, 2010 8:46 PM
this is a batch job and i email the report. yes, the job was emailing some other report produced – perhaps in this job stream – perhaps somewhere else – with the same name. i began doing research and came up with this particular api. which special value -1? in the qusrspla api? my difficulty is in actually defining and coding the parameters so i get the expected results. so far i’ve been getting a CPF3C20 when I call the api
There are two parameters that might be most commonly declared incorrectly — Length of receiver variable and Spooled file number. The API documentation shows both as BINARY(4). That essentially means they are “4-byte binary numbers”. (Or 32-bit binary.)
In ILE CL at V5R3 and later, they could both be declared as *INT, which defaults to *INT (4). In RPG IV, they could be declared as 10I 0.
Note that because ‘Spooled file number’ can accept negative values, the declaration cannot be “10U 0″. A sign must be accommodated.
Also note that “BINARY(4)” is not precisely the same as RPG’s ‘B’ data type. While the parms can generally be declared as data type ‘B’, there are plenty of reasons not to do so.
Tom