title: How to create an AS/400 command that accepts a decimal parameter with varying length?
body: <p>I need to create an AS/400 command. This command has a parameter with decimal type, which is used to return a value to a CL variable from its command processing program, which is a RPGLE program. Originally the length of the return decimal value should have length 10 with 0 decimal place, which was straightforward to do, as the length of the CL variable is also fixed. Now my boss wanted to enhance this command so that this parameter could return value to a CL variable which has a varying length (still 0 decimal place), similar to what RTVDTAARA command can do when retrieving value from a decimal data area. Can anyone tell me how to make this work? Thanks a lot.</p>