what is clile code get last digit in numarice value

Answer Posted / remya

DCLF FILE(DSP) RCDFMT(RECDSP)
DCL VAR(&X) TYPE(*DEC) LEN(2 0)
DCL VAR(&Y) TYPE(*DEC) LEN(2 0)

L1:SNDRCVF RCDFMT(RECDSP)
CHGVAR VAR(&X) VALUE(95)
CHGVAR VAR(&Y) VALUE((&X/10)*10)
CHGVAR VAR(&Y) VALUE(&X-&Y)
GOTO CMDLBL(L1)

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are the two record formats a subfile contain ?

1078


what is the maximum number of subroutines allowed in rpg?

1011


which cl command is used to trap error messages during program execution?

830


how do you specify the number of records to roll in a subfile ?

1180


what does the opcode free do?

1098






Can we debug the MSGW JOBS?

910


Why we sometimes use same file name in file and tofile in ovrdbf and sometimes different?

634


how do you specify page overflow indicator for printer files in rpg?

1424


define subsystem?

995


how does union file maintains record formats?

601


how do you know that records are locked?

1111


What Is The Difference Between Goto & Exsr?

1146


what is *inzsr used for?

1424


what is a physical file?

970


what does the ovrdbf command do?

647