× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



That will work if I wasn't using /Free.  Making a dynamic call in /Free
appears as if it is not possible with CALLP (CALL and CALLB aren't available
in /Free).

If I do something like the following:

pgm = 'RECSHPNOT';
CALLP pgm(inputFile: outputFile);

it thinks I am trying to reference 'pgm' as an array rather than use the
value in 'pgm'.

Anybody think of a way I can do this in /Free?  It looks like I will have to
go back to fixed for this particular situation. . .

Aaron Bartell

-----Original Message-----
From: Buck [mailto:buck.calabro@xxxxxxxxxxxx]
Sent: Tuesday, August 12, 2003 9:52 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Dynamic call with procedure pointers


> It seems I have run into a little bit of trouble with trying to get the
> pointer of a program.  I have a *PGM called RECSHPNOT that I am trying to
> obtain a pointer to so I can call it dynamically.

I may be confused, but if you are trying to call a *PGM object, why not use
the CALL operation code with a variable name.  Something like

select
when something
eval pgmname = 'RECSHPNOT'
endsl

call pgmname

This is as dynamic as it gets.

If you are trying to run a procedure within RECSHPNOT (on the fly), then
perhaps you need to recompile RECSHPNOT so that it is a *SRVPGM object?
  --buck



_______________________________________________
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 thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.