I have an issue with numeric types in free and I hope some one can help!
I have set @ROW and @ COL in my DDS as 3S 0H which are used for CSRLOC.
To position the cursor in native RPG I would do the following:
DScreenInfds DS
D CursorLocation 370 371B 0
C CursorLocation Div 256 @Row
C Mvr @Col
In Free I am doing the following:
/Free
@Row = %Div(CursorLocation:256)
@Col = %Rem(CursorLocation:256)
/End-Free
However, I'm getting a Receiver Value error as the result is to small. My problem is down to the fact I'm performing a calculation with the quotient being binary.
Obviously native RPG is more forgiving!
What is the best way to convert the binary format to the correct format without error.
Ta,
Stu
I have set @ROW and @ COL in my DDS as 3S 0H which are used for CSRLOC.
To position the cursor in native RPG I would do the following:
DScreenInfds DS
D CursorLocation 370 371B 0
C CursorLocation Div 256 @Row
C Mvr @Col
In Free I am doing the following:
/Free
@Row = %Div(CursorLocation:256)
@Col = %Rem(CursorLocation:256)
/End-Free
However, I'm getting a Receiver Value error as the result is to small. My problem is down to the fact I'm performing a calculation with the quotient being binary.
Obviously native RPG is more forgiving!
What is the best way to convert the binary format to the correct format without error.
Ta,
Stu
Comment