Midrange News for the IBM i Community


Posted by: Mukund Kallapur
Decimal Data Error while calling a RPG IV Program
has no ratings.
Published: 15 Dec 2011
Revised: 23 Jan 2013 - 1611 days ago
Last viewed on: 22 Jun 2017 (8187 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

Decimal Data Error while calling a RPG IV Program Published by: Mukund Kallapur on 15 Dec 2011 view comments(6)

Hello All,

Below is my RPG IV module. It is a simple calculation and has 1 sub procedure with 1 Parameter. The parameter is  numeric. When i call a program with this module and pass a numeric parameter, in spite of giving the parameter in HEX Format, I am getting Decimal Data Error.

 

//Code

 

DShiftCalc        pr             1  0                

DNoHours                         4p 0                

DHrs              s              4  0                

DShiftAll         s              4  0                

C     *entry        plist                            

C                   parm                    Hrs      

C                   eval      ShiftAll=ShiftCalc(Hrs)

C     ShiftAll      dsply                            

C                   eval      *INLR=*ON              

PShiftCalc        B                                  

DShiftCalc        pi             1  0                

DHrs                             4p 0                

DMoney            s              4  0                

C     Hrs           ifgt      40                     

C                   eval      Money=Money+2500       

C                   return    Money                  

C                   endif                                               

PShiftCalc        e      

 

\\

 

Later i call a Program TEST1. The call statement is as follows.

CALL PGM(TEST1) PARM(X'040F')

 

This gives a decimal data error.

 

Kindly assist

 

                                             

 

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS