|
First off, I've only written a two or three programs with API's before this week, and those were simple retrieves.
But I've been going around and around, etc., trying to get my first List API to work. I could tell that it was working as far as building the list in the user space because debug showed me that it had the number of entries that I expected (FWIW the API in question is QWCLSCDE for the default Job Scheduler). But nothing showed up when I went to retrieve an entry.
The basic portions of the program that are, I think, relevant are:
D/copy qsysinc/qrpglesrc,qwclscde
D SchedInfo DS Based(pSchedInfo)
D LikeDS(QWCL010000)
The program, however, kept getting blanks in all of the qwc... data elements until I changed the program to:
D*/copy qsysinc/qrpglesrc,qwclscde
D SchedInfo DS Based(pSchedInfo)
D qwcis 1 1a
D qwcjn 2 11a
D qwcenbr 12 21a
D qwcsd 22 31a
(etc.)
Obviously the methods are not equivalent, but I thought that the LikeDS copied the fields from the qsysinc member. I use QUSEC to copy in the standard API error structure with the LikeDS, and it seems to work fine.
Actually, the subject line is probably in error or misleading as this is probably an ILE RPG question. I'm probably going to hate myself in the morning (or perhaps earlier), but what is wrong with the first method?
Jerry C. Adams
IBM System i Programmer/Analyst
B&W Wholesale
office: 615-995-7024
email: jerry@xxxxxxxxxxxxxxx
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.