Write a program to display prime numbers between 1 to 100 using RPGLE.
D N S 2P 0 INZ 0
D Q S 2P 0
D R S 2P 0
D I S 2P 0
C PARM N
MOVE 2 I
DOU I >= N
I DIV N Q
MVR R
IF R=0
“Number is not PRIME” DSPLY
ENDIF
ADD 1 I
ENDDO
IF N=I
THEN
“Number is PRIME” DSPLY
ENDIF
C SETON LR
Is This Answer Correct ? | 3 Yes | 2 No |
How to set on/off a group of indicators in a single statement?
Mr.Sidc sirfor my question{how to convert date format from one format to another i think in CL/400 its CVTDAT,Please tell in RPG/400 sir not in RPGILE} you have answered using MOVE opcode,can you illustrate me with a small example sir very kind of you.
how can you display specific subfile page on the screen in unequal subfile?
Hi, Can any body tell me ur experience on this questions? Questions: 1.what is the use of SFLRCDNBR other than subfile page display? 2.Which of the following operation cannot be used in conjuction with a file coded as device type disk?
Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg
What is use of IMPORT and EXPORT in RPGLE ? What is activation Group ? What is Service Program ???? How to call another program in RPGLE ?
Assume 2 users are using the same file and first user updates some record in the file. Will the 2nd user will be able to see the updated record or not?
1.String operatio such as moving the characters to the variables? 2.what are the building functions for check file longs? 3.which of the following methods will make externally describe file fields available to a program? A: A/copy statement that specifies the library file and member of the field reference file source code B: A data structure definition specification that names the file on the EXTNAME keyword C: A data structure definition specification that names the file on the IMPORT keyword? D: A Definition specification for each desired field with the REFFLD keyword
How to declare the pull button in AS/400..
How do I link an existing logical file to it's Physical File without recompiling?
Can we journel logical file and access path? Can we use commitment control for non-join L.F?
can I touch the array during treatments?