Are you are trying to call this by issuing the command from the command line
Call Myprog 091005
I believe OS/400 will assume that your number is 15-5
If your calling from another program be sure the field is defined as Packed and not Signed in the calling program.
That is exactly what fix my problem. Thanks CharlieBrowne who would of thought the AS400 would use such a random number as 15 5 for the input field size for parm values. And of course alpha’s work the way one would expect for passing a parm with a field size that matches the input value field size. Neither of the two books I have had any mention of this in there discussion about parm’s. Thanks
One more gotya — When calling programs from the command lines character fields work well up to 32 characters. That’s because OS/400 stores your char entry in a field 32 bytes long or if longer as long as the character string provided. But if your program defines a longer parmater field .. say 512 it will use the string that you pass plus whatever is in memory immediately after that string up to the 512 characters.
Remember when we pass parameters we really pass pointers to the positions in memory.