×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Number of drinks in the rpg DS should start in pos 11.  a 5i 0 only
takes up 2 bytes.  Usually I use *next on overlays so I don't have to
think that hard LOL. 


Thanks,
Tommy Holden


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Shannon O'Donnell
Sent: Friday, November 10, 2006 9:21 AM
To: RPG programming on the AS400 / iSeries
Subject: Passing *INT2 to RPGLE 

Here's a strange problem...

 

 

I have a command definition I created that looks like this:

 

 

QUALCOL:    QUAL       TYPE(*NAME) LEN(8) RSTD(*YES) DFT(*TOAST) +


                                      SPCVAL((*TOAST) (*BISCUIT)) +


                                      CHOICE('Choose Bread')


 


                   QUAL        TYPE(*INT2) PROMPT('Number of Pieces')


 


 


                  QUAL        TYPE(*INT2) PROMPT('Number of Drinks')


 

 

In my RPGLE program, I have the input parm defined like this:

 

     

D Sides             DS                   Qualified               

D  Bread                            8a    OverLay(Sides:1)      

D  NumPcs                        5i 0  OverLay(Sides:9)    

D  NumDrnks                     5i 0  OverLay(Sides:14)

 

 

 

If I pass this in the command:

 

   ...   Choose Bread:   *BISCUIT

            Number of Pieces:    4

            Number of Drinks:     3

 

In the RPGLE program, under debug, I see this:

 

              Sides.Bread = "*BISCUIT"

              Sides.NumPcs = 4

              Sides.NumDrnks =  -15342

 

 

What's the deal?  Why wouldn't the third value, NumDrinks in this case,
be passed correctly?   All the other parameters are.

 

Any ideas?

                


This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2026 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.