|
A few suggestions to improve your error data structure: Please don't use the "B" data type when calling an API. Ever. The I and U data types were created because the B data type doesn't perform well and doesn't support the full range of numbers that could be represented in binary. Your code is really easy to convert. Just do this: D Error DS D Er_BytesPr 1 4I 0 D Er_BytesAv 5 8I 0 D Er_MsgID 9 15 D Er_Reserv 16 16 D Er_MsgDta 17 272 That was very easy. I only had to change two letters to make it use the "I" data type. Also, you should consider initializing the bytes provided and bytes available items on the definition of the structure. This helps a lot when you use this structure in a /copy member because you don't have to remember to add code to initialize it in your calc-specs. It's another easy change: D Error DS D Er_BytesPr 1 4I 0 INZ(272) D Er_BytesAv 5 8I 0 INZ(0) D Er_MsgID 9 15 D Er_Reserv 16 16 D Er_MsgDta 17 272 On Tue, 5 Mar 2002, Geert Van Landeghem wrote: > Peter, > > For the error code description have look at page 2-8 in System Api Concepts: > http://publib.boulder.ibm.com/html/as400/v5r1/ic2924/books/c4158000.pdf > > I'm always using this data structure in a /COPY member: > > ************************************************* > ** Error Datastructure > ************************************************* > D Error DS > D Er_BytesPr 1 4B 0 > D Er_BytesAv 5 8B 0 > D Er_MsgID 9 15 > D Er_Reserv 16 16 > D Er_MsgDta 17 272 > ************************************************* > > For a description of UIM and examples have look at > Application Display Programming > > http://publib.boulder.ibm.com/html/as400/v5r1/ic2924/books/c4157150.pdf > > or > > http://publib.boulder.ibm.com/pubs/html/as400/online/v4r5eng.htm > (chapter 16) >
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.