|
Let me see if I got this right. You are trying to call a CL program, or command, from RPG and you want a return code like a 0 or a 1. If that is the case then in your RPG you would have the following: CALL mypgm and off to the right have the appropriate error indicator. or call(e) mypgm and check %error But your cl program or command would have to throw an exception. Normally done with SNDPGMMSG. A different design mode, is to use the standard API error data structure. Then your CL program would propagate that, and pass it back as a parameter, and your RPG program could analyze that http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/apis/error.htm Rob Berendt -- Group Dekko Services, LLC Dept 01.073 PO Box 2000 Dock 108 6928N 400E Kendallville, IN 46755 http://www.dekko.com "Knezevic, Mihael" <m.knezevic@xxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 04/14/2004 04:58 AM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To <rpg400-l@xxxxxxxxxxxx> cc Subject return code (again =) hi everybody, what do i have to do, to specify the return code in a cl program or command to get something like: the program went fine -> 0 error type a -> 1 error type b -> 2 i noticed that if i use the ping command it returns 0 for ok and above 0 for not ok. thanx in advance for all responses. mk _______________________________________________ This is the RPG programming on the AS400 / iSeries (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.