|
The main reason I don't like using QCMDEXC is because it's a pain in the neck to debug the command when you have to maintain it. This is the snippet from my code to do the RCVNETF: C Eval CommandLine = 'RCVNETF FROMFILE(INRECX) ' + C 'TOFILE(CARTCNX/ARCHINRECX) ' + C 'FROMMBR(' + %Trim(NetMember) + ') ' + C 'TOMBR(' + %Trim(RcvName) + ') ' + C 'NBR(' + %Trim(%Char(NetNumber)) + ') ' + C 'USER(QPGMR)' C Call 'QCMDEXC' C Parm CommandLine C Parm CommandLen That is not pretty, and a year from now, when someone has to maintain this they are going to curse me, or I am going to curse myself <grin>. This code here needs to be changes some more, specifically not hard coding the library name but using the library list and such. Also, I am thinking there will be overhead when this runs. I'm not as sure how this works as the similar thing does on a PC in Pascal or C, but we know for sure that this is going to have to load the RCVNETF command, then load the program that RCVNETF calls, then load the command. Also, where is my feedback from this command? How do I know if it errored or not? I'll have to use a *PSSR and look for the error number that's returned, but how am I sure that that error was returned from this command and not one of the other commands in my program? I much prefer an Error structure being returned to me that an OS error. Much easier to deal with and I know exactly what generated it. There are people who use QCMDEXC all the time with nary a thought, I just prefer to use it as a last resort. Regards, Jim Langston Lisa.Abney@universalflavors.com wrote: > > OK ... I'll bite. What do you mean by "have yet to resort to QCMDEXC"? I'm > justing starting to use more API's ... is there a reason not to use QCMDEXC? > > Jim Langston <jimlangston@conexfreight.com> on 01/24/2001 02:40:27 PM > > Please respond to RPG400-L@midrange.com > > To: "RPG400-L@midrange.com" <RPG400-L@midrange.com> > cc: (bcc: Lisa Abney/Flavor-Indianapolis/NAFL/UFC) > > Subject: RCVNETF API? > > I doubt very highly if there is a RCVNETF API, since there wasn't really > one for WRKNETF, although I found a workaround. But, is there one? I know > I can use QCMDEXC, and is what I am going to do, but I have been building > a lot of service program functions and have yet to have to resort to QCMDEXC > to do anything. > > Anyone know how to do a RCVNETF without using QCMDEXC? > > Regards, > > Jim Langston +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.