Hi.can any body give me the code for this quesiton
please.Because i dont have to try to enter the code in to
the AS/400 server.Please can anybody give the answer for
this question with complete code?
A smple RPLE pgm which accepts the starting number and
ending number as parameter.It then has to count all the odd
numbers b/w the accepted range of numbers and display the
Ex:if the input parameters are 11 and 30 the result should
Please explain and give me the complete code?
Answers were Sorted based on User's Feedback
Answer / arijit
Please try the below code:
D @StartNum S 3S 0
D @EndNum S 3S 0
D #Counter S 3S 0
D #LoopCnt S 3S 0
D #Result S 50A
C *Entry Plist
C Parm @StartNum
C Parm @EndNum
C Eval #Result = '('
C Eval #LoopCnt = @StartNum
C Eval #Counter = 0
C DoW #LoopCnt < @EndNum
C If %REM(#loopCnt:2) =
C Eval #Result = %TRIM(#Result)
(#LoopCnt)) + ','
C Eval #Counter = #Counter +
C Eval #LoopCnt = #LoopCnt +
C Eval %SUBST(#Result:%Len(%Trim
(#Result)):1) = ' '
C Eval #Result = %CHAR(#Counter)+%
C EVAL *InLr =
|Is This Answer Correct ?||2 Yes||0 No|
D Start S 3S 0
D End S 3S 0
D Count S 3 0
D Temp S 3 0
D Rslt S 3 0
D Rslt1 S 3 0
C *Entry PLIST
C PARM Start
C PARM End
Eval Temp = Start;
Eval Count = Start;
DoW Count <= End;
If %Rem(Temp:2) <> 0;
Rslt1 = Rslt1 + 1; //Number of ODD Numbers
Rslt = Rslt + Temp; //Sum of ODD Numbers
Temp = Temp + 1;
Count += 1;
*InLR = *ON;
C** *InzSR BegSR
|Is This Answer Correct ?||0 Yes||1 No|
what would be the effect on the field where reverse image, underline and highlight display attributes are active ?
what is the correct about QTEMP library(below mention)? a.it is Unique to a job b.it can be shared between different job c.it can only be deleted by QSECOFR d.Non Please give me the answer for this?
What is field reference file?
what is primarykey?what is difference between primary key and forign key?
When does the DFT keyword in PF be used?
How to see active jobs of the system.
What is the as400 called now?
what is the syntax for plist?
if dspatr(pc) and csrloc were specified for a format, which keyword would have priority?
what are necessary keywords to code message subfile?
What is a query can be displayed without saving it?
Hi,while writing a program, what is the mandatory specification using rpg/400 (in7 specification)?And please tell me what is the difference between SCAN AND CHECK opcodes?can any body tell me in real time senario?with example?