|
-----Original Message----- From: Weatherly, Howard <hweatherly@dlis.dla.mil> To: 'COBOL400-L@midrange.com' <COBOL400-L@midrange.com> Date: Thursday, July 19, 2001 9:09 AM Subject: RE: System API QlnDumpCobol >Bruce, > >Where you have the by content fields I have variables, do they need to be >literals? here is a snippet form the program and error dump > >2 PRG PIC X(10) Value "TESTAPI". >2 LIB PIC X(10) Value "TLMTDOBJ". >2 MOD PIC X(10) Value "TESTAPI". >2 TYP PIC X(10) Value "*PGM". >2 DMP PIC X(01) Value "F". >2 ERR PIC X(72) Value "Sample Dump". That last line is your error. The 6th parm is the error return. Understand that that error return has a format, a structure. The first 8 bytes are two 4 byte binary fields. If they are both 0, then NO error information gets returned. Since you put a value in there, it gets read as binary numbers and a return is attempted. You can use variables, I did not because, as you can see in your code above, the values never really change in the program. That last part about the char(*) means an "allocated space of some size" which usually includes, as I mentioned above, the length of the space provided to the api so the api can return info. This is the "common" error code structure, documented in the first part of the system api reference. if you give it 16 characters, with 4 bytes binary value 16, 4 bytes binary 0, 8 bytes spaces, and an error occurs in the API, the first 7 characters of the 8 bytes has the message number issued by the OS. since I am not interested in a dump's dump, I give it 0 and 0 meaning, just send the message to the job, in other words, surface the message. =========================================================== R. Bruce Hoffman, Jr. -- IBM Certified Specialist - AS/400 Administrator -- IBM Certified Specialist - RPG IV Developer "America is the land that fought for freedom and then began passing laws to get rid of it." - Alfred E. Neuman +--- | This is the COBOL/400 Mailing List! | To submit a new message, send your mail to COBOL400-L@midrange.com. | To subscribe to this list send email to COBOL400-L-SUB@midrange.com. | To unsubscribe from this list send email to COBOL400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---END
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.