× 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.



where are these defined?
ssno
last
supssn

Rob Berendt
-- 
"They that can give up essential liberty to obtain a little temporary 
safety deserve neither liberty nor safety." 
Benjamin Franklin 




SCarter@xxxxxxxxxxx
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
03/21/2003 11:56 AM
Please respond to RPG programming on the AS400 / iSeries
 
        To:     RPG programming on the AS400 / iSeries 
<rpg400-l@xxxxxxxxxxxx>
        cc: 
        Fax to: 
        Subject:        Re: Parameter passing problems



Rob,
Sorry about the confusion I changed some of the variable names for posting
to the list and was interrupted several times while doing it and must have
forgotten a few.
AS far as the PR having to match the program name I was under the
assumption that when you use the EXTPGM keyword on the PR you could name
the PR any thing you want...

PRR353 program
D getlast               pr            extpgm('PRR353')
d ssnox                               like(ssno)
d best                                like(last)
d prvsupssn                           like(supssn)
d
D getlast               pi
d ssnox                               like(ssno)
d best                                like(last)
d prvsupssn                           like(supssn)


 /free
  chain(e) ssnoX pr58mf;
  if %found;
    eval best = last;
    eval prvsupssn = supssn;
  else;
    eval best = 0;
    eval prvsupssn = 0;
  endif;


****************** End of data ***************************

Here is the calling program
D getlast         pr                  extpgm('PRR353')
d ssnox                               like(ssno)
d best                                like(last)
d prvsupssn                           like(supssn)


J. Scott Carter
Programmer/Analyst
e-mail: Mailto:scarter@xxxxxxxxxxx
Phone: 214.583.0348

It's not the destination that counts in life it's the journey. The journey
with the people we love is all that really matters. Such a simple truth so
easily forgotten.


|---------+----------------------------->
|         |           rob@xxxxxxxxx     |
|         |           Sent by:          |
|         |           rpg400-l-bounces@x|
|         |           idrange.com       |
|         |                             |
|         |                             |
|         |           03/21/2003 09:39  |
|         |           AM                |
|         |           Please respond to |
|         |           RPG programming on|
|         |           the AS400 /       |
|         |           iSeries           |
|         |                             |
|---------+----------------------------->
 
>--------------------------------------------------------------------------------------------------------------|
  |                                       |
  |       To:       RPG programming on the AS400 / iSeries 
<rpg400-l@xxxxxxxxxxxx>                               |
  |       cc:                                       |
  |       Subject:  Re: Parameter passing problems                |
 
>--------------------------------------------------------------------------------------------------------------|




You didn't show a matching PI for this PR.
And you didn't show where the fields were defined.

And, doesn't the PI have to match the program name if you are using PI
instead of *ENTRY PLIST?  If so, doesn't that mean the PR should match the
PI?  (At least the PR in the called program.  I suppose you could have a
different name in the calling program.)

Rob Berendt
--
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
Benjamin Franklin




SCarter@xxxxxxxxxxx
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
03/20/2003 06:13 PM
Please respond to RPG programming on the AS400 / iSeries

        To:     RPG programming on the AS400 / iSeries
<rpg400-l@xxxxxxxxxxxx>
        cc:
        Fax to:
        Subject:        Parameter passing problems


I am getting bad data being from a called program. Causing decimal data
errors when sending data back to the calling program,.
I have a created a small program to get information from a file and pass
it
back to a calling program.   This program is compiled with crtbndRPG and
is
not a real Proc

getinfo program
D getlast               pr            extpgm('PRR353')
d ssnox                               like(ssno)
d best                                like(last)
d prvsupssn                           like(supssn)
d
D getlastblood    pi
d ssnox                               like(ssno)
d best                                like(last)
d prvsupssn                           like(supssn)


 /free
  chain(e) ssnoX pr58mf;
  if %found;
    eval bestblood = lastblood;
    eval prvsupssn = supssn;
  else;
    eval bestblood = 0;
    eval prvsupssn = 0;
  endif;


****************** End of data ***************************

Here is the calling program
D getlast         pr                  extpgm('PRR353')
d ssnox                               like(ssno)
d best                                like(last)
d prvsupssn                           like(supssn)


SSNO                  PACKED(9,0)          000000000.
SSNOX                 PACKED(9,0)           4 5 6 9 .
best                  PACKED(4,1)
PRVSUPSSN             PACKED(9,0)


                                                          RPG programming
on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


J. Scott Carter
Programmer/Analyst
e-mail: Mailto:scarter@xxxxxxxxxxx
Phone: 214.583.0348

It's not the destination that counts in life it's the journey. The journey
with the people we love is all that really matters. Such a simple truth so
easily forgotten.


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

Replies:

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.