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



sorry for that

original code
PO0001 RPGIV

D P$co#    S      like(co)   /*    co  = 2 0
D P$plt#   S      like(plt)  /*    plt = 2 0
D P$iloc   S      like(iloc) /*    iloc= 3 0
D P$po#    S      like(po)   /*    po =  6 0
D P$item   S      like(itm)  /*    itm= 15
D P$lin#   S      like(lin)  /*    lin=  3 0

CALL      'PO0002'
Parm                    P$co#
Parm                    P$plt#
Parm                    P$iloc
Parm                    P$po#
Parm                    P$item
Parm                    P$lin#


PO0002 RPGIV
*entry plist
Parm                    P$co#
Parm                    P$plt#
Parm                    P$iloc
Parm                    P$po#
Parm                    P$item
Parm                    P$lin#

P$lin# was getting data dec. error so he change to the following:

PO0001  RPGIV

D P$co#    S      like(co)   /*    co  = 2 0
D P$plt#   S      like(plt)  /*    plt = 2 0
D P$iloc   S      like(iloc) /*    iloc= 3 0
D P$po#    S      like(po)   /*    po =  6 0
D P$item   S      like(itm)  /*    itm= 15
D P$lin#   S      like(lin)  /*    lin=  3 0

D P155     S     15 5

D P2co#    S      like(p155)
D P2plt#   S      like(p155)
D P2iloc   S      like(p155)
D P2po#    S      like(p155)
D P2lin#   S      like(p155)


CALL      'PO0002'
Parm                    P2co#
Parm                    P2plt#
Parm                    P2iloc
Parm                    P2po#
Parm                    P2lin#
Parm                    P$item


PO0002  RPGIV

D P$co#    S      like(co)   /*    co  = 2 0
D P$plt#   S      like(plt)  /*    plt = 2 0
D P$iloc   S      like(iloc) /*    iloc= 3 0
D P$po#    S      like(po)   /*    po =  6 0
D P$item   S      like(itm)  /*    itm= 15
D P$lin#   S      like(lin)  /*    lin=  3 0

D P155     S     15 5

D P2co#    S      like(p155)
D P2plt#   S      like(p155)
D P2iloc   S      like(p155)
D P2po#    S      like(p155)
D P2lin#   S      like(p155)

*entry plist
Parm                    P2co#
Parm                    P2plt#
Parm                    P2iloc
Parm                    P2po#
Parm                    P2lin#
Parm                    P2item

z-add p2co#    p$co#    <<<< target to small error
etc.

I can fix but was looking for a "best way" to handle this.
He has changed to this in multi programs. Now I'm stuck
cleaning up. But would rather do it right than patch up.

Asking for suggestions on how others would handle.

Keeping in mind than PO0001 or PO0002 might be called from RPG III also.

Thanks

 Bill H

-----Original Message-----
From: Scott Mildenberger [mailto:Smildenber@Washcorp.com]
Sent: Friday, October 25, 2002 11:29 AM
To: 'rpg400-l@midrange.com'
Subject: RE: Best way for numeric parms


Bill,

You should only get an error where you indicated if passcompany has a value
that won't fit in a 2,0 field.  In your example where the value is 1 this
should work fine (I didn't test it).  The scenario could result in an error
but not if the original fields in the programs are the same size.  Why are
all your program to program calls changed to 15,5?  This would only be
necessary if the programs are being called directly from the command line.

Scott Mildenberger

> -----Original Message-----
> From: Hopkins, Bill [mailto:BHopkins@saurerinc.com]
> Sent: Friday, October 25, 2002 9:14 AM
> To: 'rpg400-l@midrange.com'
> Subject: Best way for numeric parms
>
>
> I have a client who just with through alot of code and change
> Plist to use
> 15 5 values in his calls to RPG IV programs.
>
> stop data decimals on calls but now of course getting target
> to smal when
> trying to move back to correct size.
>
> ruff example RPGII call to RPG IV he has done
>
> RPGII code
>
> z-add 1             company          2 0
> z-add company passcompany
> call 'pgm2'
> parm                passcompany  15 5
>
>
> RPG IV code
>
> *Entry plist
>           parm     passcompany   15 5
>
>
> z-add passcompany  keycompany 2 0    <<< error of course
>
> Can fix but was wanting to get
> suggestions for replacement code
> for all of these type calls.
>
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
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.