|
Holden Tommy wrote:
Here's a snippet of code for the QUSRJOBI api: DRtvJobInfo PR ExtPgm('QUSRJOBI') ... D ErrorCode_ 32767a Options(*Varsize) Varying ...
Warning, warning! Remove Varying from the error code parameter. The error code is a data structure where the first 4 bytes have the length of the structure. If you pass a varying length string, you're almost certain to get data corruption when the API misinterprets the first 4 bytes. If you've been getting away with this, it's probably because you are passing a zero length string, and the first 2 bytes of the data are x'0000', so the first 4 bytes have x'00000000'. Also just a suggestion, if you code OPTIONS(*VARSIZE) on the first parameter to QUSRJOBI, you could pass JOBI0700 directly and avoid the substring. DRtvJobInfo PR ExtPgm('QUSRJOBI') D OutputData 32767a Options(*Varsize) D DataLength 10i 0 D RtvFormat 8a Const D QualJob 26a Const D InternalJobID 16a Const D ErrorCode_ 32767a Options(*Varsize) RtvJobInfo(JOBI0700 :%Size(JOBI0700) :'JOBI0700' :QualJob :InternalJob :ErrorCode_);
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.