|
It's really not the name szCmd. It's the fact the defining a Prototype (PR in col 24) doesn't define the variables used as parameter names. That is done in the PI. Because you are prototyping a C procedure, there is no PI so if you wanted to define a szCmd as Varying and pass that, And, you don't have to use /FREE. Here is an example: Dsystem PR 10i 0 extproc('system') D * options(*string) value DszCmd S 500 varying C eval szCmd = 'ADDPFM FILE(MyFile) MBR(MyMbr)' C if system(szCmd) <> 0 C do something here Thanks, Mark Mark D. Walter Senior Programmer/Analyst CCX, Inc. mwalter@xxxxxxxxxx http://www.ccxinc.com "Bill Hopkins" <BHopkins@LibertyHar To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> dware.com> cc: Sent by: Subject: Re: Trying to Find API for ADDPFM rpg400-l-bounces@mid range.com 09/04/2003 04:00 PM Please respond to RPG programming on the AS400 / iSeries Thanks much, But I know the Client would S@#T over seeing /FREE was just trying to sneak in system prototype so I could handle messages better. Any one know why it does not like the name szCmd? Thanks Bill Hopkins MWalter@xxxxxxxxxxxxxxx Sent by: rpg400-l-bounces@xxxxxxxxxxxx 09/04/2003 03:48 PM Please respond to RPG programming on the AS400 / iSeries To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> cc: Subject: Re: Trying to Find API for ADDPFM because the prototype doesn't 'define' the variable You really don't even have to name it if you don't want to. You could define it like this: Thanks, Mark Mark D. Walter Senior Programmer/Analyst CCX, Inc. mwalter@xxxxxxxxxx http://www.ccxinc.com "Bill Hopkins" <BHopkins@LibertyHar To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> dware.com> cc: Sent by: Subject: Re: Trying to Find API for ADDPFM rpg400-l-bounces@mid range.com 09/04/2003 03:39 PM Please respond to RPG programming on the AS400 / iSeries Hey got question about example in acticle: D system PR 10I 0 ExtProc( 'system' ) D szCmd * Value Options( *String ) How come szCmd gets "*RNF7030 The name or indicator szCmd is not defined." Is it because I'm on v5r1. By the way I decided to do it anyway :) Hell, all but one, won't notice anyway. Thanks Bill Hopkins Marco Facchinetti <facchinetti@xxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 09/04/2003 01:13 PM Please respond to RPG programming on the AS400 / iSeries To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> cc: Subject: Re: Trying to Find API for ADDPFM Just about that: http://www.mcpressonline.com/mc/.6ae795bb HTH Marco --- MWalter@xxxxxxxxxxxxxxx wrote: > > You could use the C 'system' function and import the > '_EXCP_MSGID' to > monitor for the not found message. > > Thanks, > > Mark > > Mark D. Walter > Senior Programmer/Analyst > CCX, Inc. > mwalter@xxxxxxxxxx > http://www.ccxinc.com > > __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com _______________________________________________ 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. _______________________________________________ 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. _______________________________________________ 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. _______________________________________________ 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.