|
Of course the documentation would be under the Unix type API's! Thanks to all for help. John J. Perry -----Original Message----- From: RPG400-L Digest [SMTP:owner-rpg400-l-digest@midrange.com] Sent: Thursday, May 24, 2001 7:51 PM To: rpg400-l-digest@midrange.com Subject: RPG400-L Digest V3 #228 RPG400-L Digest Thursday, May 24 2001 Volume 03 : Number 228 This is the RPG/400 Digest 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-DIGEST-SUB@midrange.com. To unsubscribe from this list send email to RPG400-L-DIGEST-UNSUB@midrange.com. Questions should be directed to the list owner/operator: david@midrange.com *** DO NOT QUOTE THIS ENTIRE DIGEST WHEN REPLYING *** Topics in this issue . . . RE: Debugging a batch program Re: Debugging a batch program Re: %size problem RE: /INCLUDE directive Re: Debugging a batch program Re: Debugging a batch program - WAIT4ME code Re: Debugging a batch program - WAIT4ME code RE: Debugging a batch program RE: /INCLUDE directive RE: Debugging a batch program Re: MCH3601 errors Re: MCH3601 errors MCH3601 errors FW: IFS API Documentation RE: Debugging a batch program RE: IFS API Documentation RE: IFS API Documentation Re: FW: IFS API Documentation ILE CL calling RPG procedure help. Re: ILE CL calling RPG procedure help. Re: ILE CL calling RPG procedure help. Re: ILE CL calling RPG procedure help. ---------------------------------------------------------------------- Date: Wed, 23 May 2001 18:31:40 -0400 From: "Phil" <sublime78ska@yahoo.com> Subject: RE: Debugging a batch program Mike, After STRDBG exit out of the source. You can't set a breakpoint here. Release the jobq A screen will come up saying to press F10 to debug or enter to continue. Press F10 Then type DSPMODSRC, press enter Now, you can set your break points. Phil - -----Original Message----- From: owner-rpg400-l@midrange.com [mailto:owner-rpg400-l@midrange.com]On Behalf Of Wills, Mike N. (TC) Sent: Wednesday, May 23, 2001 5:31 PM To: 'RPG400-L@midrange.com' Subject: Debugging a batch program How do I debug a batch program? I know you can use STRSRVJOB and then use STRDBG. So what I did was put the jobq on hold (test jobq so it is not a major thing to put on hold) so I could get the job number. Then used STRSRVJOB on the job, followed by STRDBG and was going to set a break point, but it wouldn't let me set one. Something about "cannot perform this function when job is not active". Am I doing something wrong? The job runs for about 20 seconds normally. Thanks for any help in advance. Mike BTW this is a RPG program. +--- | 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 +--- _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ------------------------------ Date: Wed, 23 May 2001 19:54:22 -0400 From: Patrick W Conner <PWConner@Charter.net> Subject: Re: Debugging a batch program Instead of setting your break point when you are getting the error message, press F12 to go back to a command line. Release the out queue. A message will display stating "...press F10 for debug or enter to continue..." when your job goes active. Press F10. Your source should appear (if not, use the DSPMODSRC command). Now, set your break points and continue. Hope that helps "Wills, Mike N. (TC)" wrote: > How do I debug a batch program? > > I know you can use STRSRVJOB and then use STRDBG. So what I did was put the > jobq on hold (test jobq so it is not a major thing to put on hold) so I > could get the job number. Then used STRSRVJOB on the job, followed by STRDBG > and was going to set a break point, but it wouldn't let me set one. > Something about "cannot perform this function when job is not active". Am I > doing something wrong? The job runs for about 20 seconds normally. > > Thanks for any help in advance. > > Mike > > BTW this is a RPG program. > +--- > | 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 > +--- ------------------------------ Date: Wed, 23 May 2001 20:01:28 -0400 From: Patrick W Conner <PWConner@Charter.net> Subject: Re: %size problem Thanks. I thought it was because Item wasn't defined, yet. But I saw some examples doing exactly this. Didn't think of the version differences. bmorris@ca.ibm.com wrote: > >Date: Tue, 22 May 2001 09:12:50 -0400 > >From: "Patrick Conner" <pwconner@charter.net> > > > > 575 ** #Item is defined to use the size of item when > >defining the array > > 576 D#Item S Like(Item) > > 577 D#ItemScan S 1A Dim(%size(#Item)) > > ======> aaaaa > > *RNF3320 20 a 015000 The keyword parameter is not > > defined; keyword is ignored. > > > >What gives? > > Patrick, until V5R1, the parameter for DIM has to be > known at the time the DIM is encountered. In your case, > you have "item" coming from an externally-described file, > but the I specs are done too late, after the D specs. You > could try coding an externally described data structure to > get an explicit definition for "item". > > Fmyfile if e disk > D e ds extname(myfile) > D #item s like(item) > D #itemScan s 1a dim(%size(#Item)) > > In V5R1, the rules for DIM were changed to allow forward > referencing of the dimension. > > If you're doing a MOVEA from #item to #itemScan so you can > do string operations on the array, you might consider doing > some combination of string operations directly on #item, instead. > (%subst, %scan, %replace ...) > > Barbara Morris > > +--- > | 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 > +--- ------------------------------ Date: Wed, 23 May 2001 20:03:12 -0400 From: bmorris@ca.ibm.com Subject: RE: /INCLUDE directive >Date: Wed, 23 May 2001 13:22:43 -0400 >From: "Phil" <sublime78ska@yahoo.com> > >I tried the /IF DEFINED and it works great in Code/400 with verify. But >when I compile, not only is the SQLCA in the copy member not copied but the >sqlca that I expected the compiler to create was excluded as well. There >were 86 lines excluded but my copy member only has 30. This is true both in >Code/400 and when I prompted CRTSQLRPGI at the command line. SQL puts the SQLCA right before the first C spec. If you code your conditioned /COPY right at the end of D specs, the SQL adds the SQLCA right before the /ENDIF. Try putting at least one other D spec after your conditioned /COPY. By the way, to see what lines are being exluded by /IF, use OPTION (*SHOWSKIP). Barbara Morris ------------------------------ Date: Thu, 24 May 2001 07:44:01 +0100 From: Martin Rowe <martin@dbg400.net> Subject: Re: Debugging a batch program On Wednesday 23 May 2001 22:31, Wills, Mike N. (TC) wrote: > How do I debug a batch program? > > I know you can use STRSRVJOB and then use STRDBG. So what I did was put > the jobq on hold (test jobq so it is not a major thing to put on hold) > so I could get the job number. Then used STRSRVJOB on the job, followed > by STRDBG and was going to set a break point, but it wouldn't let me > set one. Something about "cannot perform this function when job is not > active". Am I doing something wrong? The job runs for about 20 seconds > normally. > > Thanks for any help in advance. > > Mike Hi Mike Others have pointed out how to do this, but I've another take on it. We have a number of routines where you can't capture the job before it's submitted, so don't get to run STRSRVJOB before it has done its thing and finished. I wrote a little program to send an inquiry messeage to the user the job ran under - which then waits for a reply. You include a call to the program (called 'WAIT4ME' ;-) ) at the start of the routine to debug. The inquiry message includes the STRSRVJOB JOB(...) text filled in for you to cut & paste to a command line. Once you've set up debug (because the program is already active) just reply to message and you're away. I'll post the code to the list (a few lines of CL) later on today. Regards, Martin - -- martin@dbg400.net / jamaro@firstlinux.net http://www.dbg400.net DBG/400 - DataBase Generation utilities Open Source test environment tools for the AS/400 / iSeries and miscellaneous database & spooled file management commands. ------------------------------ Date: Thu, 24 May 2001 09:43:31 +0100 From: Martin Rowe <martin@dbg400.net> Subject: Re: Debugging a batch program - WAIT4ME code On Thu, 24 May 2001, I wrote: <snipped> Here's the CL code for WAIT4ME - I use for debugging RPG programs so hopefully it's not too off topic here ;-) Just include the line[1] C CALL 'WAIT4ME' at the start of the program you're wanting to debug Regards, Martin [1] and remember to remove it afterwards ;-) /********************************************************************/ /* WAIT4ME: Send reply message to submitting user, & wait for reply */ /* MJR Mar'98 */ /********************************************************************/ PGM DCL VAR(&MSGDTA) TYPE(*CHAR) LEN(512) DCL VAR(&TOUSR) TYPE(*CHAR) LEN(10) DCL VAR(&JOB) TYPE(*CHAR) LEN(10) DCL VAR(&INQMSGRPY) TYPE(*CHAR) LEN(10) DCL VAR(&JOBNBR) TYPE(*CHAR) LEN(6) DCL VAR(&QUALJOB) TYPE(*CHAR) LEN(28) DCL VAR(&MSGRPY) TYPE(*CHAR) LEN(1) MONMSG MSGID(CPF0000) RTVJOBA JOB(&JOB) USER(&TOUSR) NBR(&JOBNBR) + INQMSGRPY(&INQMSGRPY) CHGJOB INQMSGRPY(*RQD) CHGVAR VAR(&QUALJOB) VALUE(&JOBNBR || '/' |< &TOUSR |< + '/' |< &JOB) CHGVAR VAR(&MSGDTA) VALUE(&QUALJOB) /* Send the message, and pass back the reply */ SNDUSRMSG MSGID(INQ1111) MSGF(MyMsgF) + MSGDTA(&MSGDTA) TOUSR(&TOUSR) MSGRPY(&MSGRPY) CHGJOB INQMSGRPY(&INQMSGRPY) ENDPGM: RETURN ENDPGM /********************************************************************/ /* Add this message to the message file used above ... + ADDMSGD MSGID(INQ1111) MSGF(MyMsgF) MSG('Your program is + active. Run STRSRVJOB JOB(&1) followed b, then reply to this + message with a G.') SEV(99) FMT((*CHAR 28)) TYPE(*CHAR) + LEN(1) VALUES('G' 'g') SPCVAL(('g' 'G')) */ /********************************************************************/ - -- martin@dbg400.net / jamaro@firstlinux.net http://www.dbg400.net DBG/400 - DataBase Generation utilities Open Source test environment tools for the AS/400 / iSeries and miscellaneous database & spooled file management commands. ------------------------------ Date: Thu, 24 May 2001 11:22:00 +0100 From: Martin Rowe <martin@dbg400.net> Subject: Re: Debugging a batch program - WAIT4ME code On Thu, 24 May 2001, I wrote: Oops - MSGD should be: ADDMSGD MSGID(GPP9997) MSGF(&MSGF) MSG('Your program is + active. Run STRSRVJOB JOB(&1) followed by any debug + commands, then reply to this message with a G.') SEV(99) + FMT((*CHAR 28)) TYPE(*CHAR) LEN(001) VALUES('G' 'g') + SPCVAL(('g' 'G')) Regards, Martin - -- martin@dbg400.net / jamaro@firstlinux.net http://www.dbg400.net DBG/400 - DataBase Generation utilities Open Source test environment tools for the AS/400 / iSeries and miscellaneous database & spooled file management commands. ------------------------------ Date: Thu, 24 May 2001 09:05:50 -0400 From: "Valerio Vincenti" <VVincenti@spotsylvania.va.us> Subject: RE: Debugging a batch program Is it possible to use the techniques, described so far in this thread, against a user batch job sitting on an error? It would be nice to be able to use debug to check some variables before canceling or dumping the job. Valerio Vincenti Systems Analyst County of Spotsylvania, I.S. Department Spotsylvania, VA 22553 Phone (540) 582-7055 Ext. 233 Fax (540) 582-6304 e-mail: vvincenti@spotsylvania.va.us ------------------------------ Date: Thu, 24 May 2001 09:42:37 -0400 From: "Phil" <sublime78ska@yahoo.com> Subject: RE: /INCLUDE directive Barbara, Thank you very much. Putting an extra d-spec after the /ENDIF did the trick! I posted this on the Code400 list as well. Phil - -----Original Message----- From: owner-rpg400-l@midrange.com [mailto:owner-rpg400-l@midrange.com]On Behalf Of bmorris@ca.ibm.com Sent: Wednesday, May 23, 2001 8:03 PM To: RPG400-L@midrange.com Subject: RE: /INCLUDE directive >Date: Wed, 23 May 2001 13:22:43 -0400 >From: "Phil" <sublime78ska@yahoo.com> > >I tried the /IF DEFINED and it works great in Code/400 with verify. But >when I compile, not only is the SQLCA in the copy member not copied but the >sqlca that I expected the compiler to create was excluded as well. There >were 86 lines excluded but my copy member only has 30. This is true both in >Code/400 and when I prompted CRTSQLRPGI at the command line. SQL puts the SQLCA right before the first C spec. If you code your conditioned /COPY right at the end of D specs, the SQL adds the SQLCA right before the /ENDIF. Try putting at least one other D spec after your conditioned /COPY. By the way, to see what lines are being exluded by /IF, use OPTION (*SHOWSKIP). Barbara Morris +--- | 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 +--- _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ------------------------------ Date: Thu, 24 May 2001 08:52:42 -0500 From: "Wills, Mike N. (TC)" <MNWills@taylorcorp.com> Subject: RE: Debugging a batch program All, Thanks for all the help. With Tyra and Aaron's help I can now debug my program. Thanks again... Mike Wills - -----Original Message----- From: Wills, Mike N. (TC) [mailto:MNWills@Taylorcorp.com] Sent: Wednesday, May 23, 2001 4:31 PM To: 'RPG400-L@midrange.com' Subject: Debugging a batch program How do I debug a batch program? I know you can use STRSRVJOB and then use STRDBG. So what I did was put the jobq on hold (test jobq so it is not a major thing to put on hold) so I could get the job number. Then used STRSRVJOB on the job, followed by STRDBG and was going to set a break point, but it wouldn't let me set one. Something about "cannot perform this function when job is not active". Am I doing something wrong? The job runs for about 20 seconds normally. Thanks for any help in advance. Mike BTW this is a RPG program. +--- | 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 +--- ------------------------------ Date: Thu, 24 May 2001 10:16:20 -0400 (EDT) From: Don <dr2@cssas400.com> Subject: Re: MCH3601 errors David, Uh, you can be getting 3601's for several reasons...includeing hardware problems. This used to be a precursor to a DASD failure in S/38 days....along with MCH0801's... Suggest you run EREP on the DASD ASAP just to rule it out and check your QHST LOGs.... BTW, this is off list to be on a RPG list...you shouldbe posting this to midrange-l... :) :) :) :) :) (loading the new Janeway armour shields...:) - ------------- On Thu, 24 May 2001, David Gibbs wrote: > Folks: > > I've got a particularly perplexing problem with a MCH3601 exception. > > I understand that this error is often caused by a missing, or incorrectly > specified, parameter on a program call. Unfortunately, I can't figure out > where the parameter error is. I've looked at everything near the failure > point, both RPG and CL, and everything jives with the docs. > > Any suggestions on how to debug this? > > Thanks! > > david > > > -- > David Gibbs > Sr. Software Engineer > Mortice Kern Systems US, Inc. > 2500 S. Highland Ave., Suite 200 > Lombard, IL 60148 > > phone: (630) 495-2108 x5004 > http://www.mks.com > mailto:dgibbs@mks.com > > Need a laugh: http://www.userfriendly.org/static > > +--- > | This is the Midrange System Mailing List! > | To submit a new message, send your mail to MIDRANGE-L@midrange.com. > | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. > | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. > | Questions should be directed to the list owner/operator: david@midrange.com > +--- > ------------------------------ Date: Thu, 24 May 2001 16:24:15 +0200 From: "Rolf Mittag" <rm@r-m-e-d-v.de> Subject: Re: MCH3601 errors is it ILE ? is it prototyped ? double check all parms from RpgIV to CLLE are passed as pointers (i.e. do not use "value"). - --------------------------- Dipl.Inf.(FH) Rolf P Mittag IBM Partner in Development Leipziger Str. 50 D-69214 Eppelheim Fon: +49 (6221) 76 78 60 Fax: +49 (6221) 76 80 26 eMl: rm@r-m-e-d-v.de ------------------------------ Date: Thu, 24 May 2001 09:00:55 -0500 From: David Gibbs <dgibbs@mks.com> Subject: MCH3601 errors Folks: I've got a particularly perplexing problem with a MCH3601 exception. I understand that this error is often caused by a missing, or incorrectly specified, parameter on a program call. Unfortunately, I can't figure out where the parameter error is. I've looked at everything near the failure point, both RPG and CL, and everything jives with the docs. Any suggestions on how to debug this? Thanks! david - -- David Gibbs Sr. Software Engineer Mortice Kern Systems US, Inc. 2500 S. Highland Ave., Suite 200 Lombard, IL 60148 phone: (630) 495-2108 x5004 http://www.mks.com mailto:dgibbs@mks.com Need a laugh: http://www.userfriendly.org/static ------------------------------ Date: Thu, 24 May 2001 11:27:53 -0400 From: John Perry <jperry@setacorporation.com> Subject: FW: IFS API Documentation I've looked and asked and can't find definitive documentation on the IFS API's as thay are used from within RPG on the AS400. Simple Stuff: I want to open, read, write, close. But, I don't want to just look at somebody's else's code and hope they're doing exactly what I want to do. All the docs I've seen so far want to point me at some simple-minded example without explaining all the details and all the options. I want to see the documentation on the Open flags and ALL possible parameters. Is this information available ANYWHERE? John J. Perry ------------------------------ Date: Thu, 24 May 2001 08:35:43 -0700 From: Tyra_Brodsky@vfc.com Subject: RE: Debugging a batch program Yes you can. "Valerio Vincenti" <VVincenti@spotsylva To: <rpg400-L@midrange.com> nia.va.us> cc: Sent by: Subject: RE: Debugging a batch program owner-rpg400-l@midra nge.com 05/24/01 06:05 AM Please respond to RPG400-L Is it possible to use the techniques, described so far in this thread, against a user batch job sitting on an error? It would be nice to be able to use debug to check some variables before canceling or dumping the job. Valerio Vincenti Systems Analyst County of Spotsylvania, I.S. Department Spotsylvania, VA 22553 Phone (540) 582-7055 Ext. 233 Fax (540) 582-6304 e-mail: vvincenti@spotsylvania.va.us +--- | 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 +--- ------------------------------ Date: Thu, 24 May 2001 13:11:49 -0400 From: Buck Calabro <Buck.Calabro@commsoft.net> Subject: RE: IFS API Documentation John Perry wrote: >I've looked and asked and can't find definitive documentation on the IFS >API's as thay are used from within RPG on the AS400. - -snip- I always supposed that the state of the IFS documentation is a result of the IFS being "ported" as it were, to the 400. The IFS is for all intents and purposes a Unix-like file system. That means that just about any C book would explain the particulars of open, read, write and close. On the 400, the Unix API manual is probably the official reference although I'd be remiss if I failed to mention the Redbook "Who knew you could do that..." When you look at any C based documentation, bear in mind the fact that C programmers use constants in system header files for things like O_TEXTDATA. You may never find a manual reference to the actual value of O_TEXTDATA; for that you'll have to poke through the C header files. They're located in QCLE and QSYSINC. The main ones are named H and SYS, although there are more than that. An alternative is to compile a C program and turn on ALL the documentation flags so you can see the includes in the listing. This may well work on a PC as well as the 400 but I'm out of my depth there... Buck Calabro Commsoft; Albany, NY "Nothing is so firmly believed as that which we least know" -- Michel Montaigne Visit the Midrange archives at http://www.midrange.com ------------------------------ Date: Thu, 24 May 2001 14:24:35 -0400 From: "Mangavalli, Ramanujam" <RamM@Mvmills.com> Subject: RE: IFS API Documentation go to the infocenter. Click on Programming on the left hand frame. Then click on CL and APIs. Then click on APIs. then click on APIs by Category. Then click on Unix-Type. Then click on Integrated File System APIs. You should be able to find read(), write(), close(), open() in here. If not, pls. let me know and I will cut and paste and email the docs to you. HTH. - -----Original Message----- From: John Perry [mailto:jperry@setacorporation.com] Sent: Thursday, May 24, 2001 11:28 AM To: 'RPG400-L@midrange.com' Subject: FW: IFS API Documentation I've looked and asked and can't find definitive documentation on the IFS API's as thay are used from within RPG on the AS400. Simple Stuff: I want to open, read, write, close. But, I don't want to just look at somebody's else's code and hope they're doing exactly what I want to do. All the docs I've seen so far want to point me at some simple-minded example without explaining all the details and all the options. I want to see the documentation on the Open flags and ALL possible parameters. Is this information available ANYWHERE? John J. Perry +--- | 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 +--- ------------------------------ Date: Thu, 24 May 2001 13:33:54 -0500 (CDT) From: Scott Klement <klemscot@klements.com> Subject: Re: FW: IFS API Documentation There's lots of documentation on the IFS... but it's all written for C programmers, with the assumption that you're planning to call it from a C program. Thus, in order to really take advantage of the documentation, you need to be capable of converting things from C to RPG. This book is called the "Integrated File System Introduction" and isn't too bad as a starting point, explaining how the IFS works and how you access it from C programs: http://publib.boulder.ibm.com:80/cgi-bin/bookmgr/BOOKS/QBKAUH01/CCONTENTS This book is really where the details are documented about calling the IFS functions, it's called the "Unix-Type APIs manual" Again, it assumes that you're a C programmer: http://publib.boulder.ibm.com/pubs/html/as400/v4r5/ic2924/info/apis/unix 2.htm The RPG "Who knew you could do that..." Redbook does go into actually coding some of this stuff in RPG, but probably doesn't provide the level of detail that you're looking for. If you're proficient enough in C that you can translate the code from C to RPG (including looking things up in the C header files, and using that info to make your own RPG header files) you should be able to find "all possible parameters" in the IBM manuals. Have fun! On Thu, 24 May 2001, John Perry wrote: > > I've looked and asked and can't find definitive documentation on the IFS > API's as thay are used from within RPG on the AS400. > > Simple Stuff: I want to open, read, write, close. But, I don't want to > just look at somebody's else's code and hope they're doing exactly what I > want to do. All the docs I've seen so far want to point me at some > simple-minded example without explaining all the details and all the > options. I want to see the documentation on the Open flags and ALL possible > parameters. Is this information available ANYWHERE? > > > John J. Perry ------------------------------ Date: Thu, 24 May 2001 14:59:55 -0400 From: "Slava Zharichenko" <Slava.Zharichenko@exel.com> Subject: ILE CL calling RPG procedure help. hi, it is not exactly Rpg question but i think most of you would know the answer to it. i have a CL module calling RPG procedure using CALLPRC command. now, procedure name should be RPG module name, procedure name or procedure name in quotes?? it does not work in either case for me. Here is the message i am getting: Definition not found for symbol 'DeleteMbr'. Service pgm being created using binding directory. ______________________________________________________________________ Important Email Information The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. If you are not the intended addressee please contact the sender and dispose of this e-mail. ------------------------------ Date: Thu, 24 May 2001 16:15:59 -0600 From: "John Taylor" <john.taylor@telusplanet.net> Subject: Re: ILE CL calling RPG procedure help. - ----- Original Message ----- From: "Slava Zharichenko" <Slava.Zharichenko@exel.com> To: <RPG400-L@midrange.com> Sent: Thursday, May 24, 2001 12:59 Subject: ILE CL calling RPG procedure help. > > hi, > it is not exactly Rpg question but i think most of you would know the > answer to it. > > i have a CL module calling RPG procedure using CALLPRC command. > > now, procedure name should be RPG module name, procedure name or procedure > name in quotes?? The name should be the name of the *procedure* that you've specified as an EXPORT within the RPG module - without quotes: CallPrc MyExportedProc > > it does not work in either case for me. Here is the message i am getting: > Definition not found for symbol 'DeleteMbr'. > > Service pgm being created using binding directory. > - -Have you specified EXPORT on the procedure interface? - -Have you added the module name to the binding directory? You can try specifying the name of the RPG module on the MODULE parameter of the CRTPGM command, in order to eliminate any binding directory problems. It would help if you could post some code for us to see. We don't need the body of the RPG module; just the procedure interface(s). John Taylor Canada ------------------------------ Date: Thu, 24 May 2001 17:20:40 -0500 (CDT) From: Scott Klement <klemscot@klements.com> Subject: Re: ILE CL calling RPG procedure help. The RPG compiler (annoyingly, in my opinion) will capitalize all the letters in all the procedure/module/variable names as its compiling the program. Therefore, if you want to call a procedure written in RPG, you need to put the name in CAPS. Like so: CALLPRC PRC('DELETEMBR') You also need to make sure that the procedure is exported from the service program. To do this, you need to: 1) specify the EXPORT keyword on your P-spec in the RPG program. 2) If binding with EXPORT(*SRCFILE) you need to have specified your procedure with EXPORT SYMBOL(DELETEMBR) in the binding language source. 3) If binding with EXPORT(*ALL), you should be okay, as long as you fulfilled condition #1. If this doesn't help, you'll need to post the relevant code... On Thu, 24 May 2001, Slava Zharichenko wrote: > > hi, > it is not exactly Rpg question but i think most of you would know the > answer to it. > > i have a CL module calling RPG procedure using CALLPRC command. > > now, procedure name should be RPG module name, procedure name or procedure > name in quotes?? > > it does not work in either case for me. Here is the message i am getting: > Definition not found for symbol 'DeleteMbr'. > > Service pgm being created using binding directory. > ------------------------------ Date: Thu, 24 May 2001 17:41:41 -0600 From: "John Taylor" <john.taylor@telusplanet.net> Subject: Re: ILE CL calling RPG procedure help. Scott, I haven't run across this necessity for uppercase names on CALLPRC. The following example (from a real pgm) compiles fine and resolves to the correct procedure: CallPrc WrkwSlsOrd As you've stated, the RPG compiler will export the proc name in capitalized form, so I suspect that the CLLE compiler is forcing everything to uppercase on our behalf. This works at least as far back as V4R2. John Taylor Canada - ----- Original Message ----- From: "Scott Klement" <klemscot@klements.com> To: <RPG400-L@midrange.com> Sent: Thursday, May 24, 2001 16:20 Subject: Re: ILE CL calling RPG procedure help. > > The RPG compiler (annoyingly, in my opinion) will capitalize all the > letters in all the procedure/module/variable names as its compiling > the program. > > Therefore, if you want to call a procedure written in RPG, you need > to put the name in CAPS. Like so: > > CALLPRC PRC('DELETEMBR') > > You also need to make sure that the procedure is exported from the > service program. To do this, you need to: > 1) specify the EXPORT keyword on your P-spec in the RPG program. > 2) If binding with EXPORT(*SRCFILE) you need to have specified > your procedure with EXPORT SYMBOL(DELETEMBR) in the binding > language source. > 3) If binding with EXPORT(*ALL), you should be okay, as long as > you fulfilled condition #1. > > If this doesn't help, you'll need to post the relevant code... > ------------------------------ End of RPG400-L Digest V3 #228 ****************************** +--- | This is the RPG/400 Digest 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-DIGEST-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-DIGEST-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | 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-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.