1.Can any body share me about thease opcodes with example
please.Im new for AS/400.Could u please tell me in real
senario?
1.TESTN,
2.EVAL
3.EVALR,
TIME,
4.MONITOR
5. ENDMON
6.ON-ERROR
7.COMMIT
ROLLBACK?



1.Can any body share me about thease opcodes with example please.Im new for AS/400.Could u please ..

Answer / sumit gupta

TESTN:- this opcode test whether the variable placed at
result field is numeric and return the high(HI) indicator
value as '1'. Rest LO and EQ will remain off.

Eval:- This opcode is applicable for only same type of
character. Eg:- if you want to move a character value to
numeric value then IT WILL THROUGH COMPILATION ERROR.
Bydefault, eval opcode will move from left. For eg:- let
abc=' ' then
eval abc='AAA' abc will be 'AAA '

EVALR:- same as previous diffrence is right adjust.

TIME:- This opcode will return the system time of day.

MONITOR:- this opcode is used to monitor the error in rpgle
program.

ENDMON:- This opcode is used in conjunction with MONITOR
opcode.

ON-ERROR:- This is used again wilt monitor and endmon opcode
MONITOR
ON-ERROR
ENDMON

COMMIT:- This opcode is used to commit the changes in the
file.
COMMMIT keyword is used in F-specs like
Fabc UA F DISK COMMIT(*IN03)
:
:
C If *in03='1'
C COMMIT
C ELSE
C ROLLACK
C ENDIF

If Indicator 03 is '1' then commit all the changes done in
the database file. Else rollback is done onto that database
file.

Is This Answer Correct ?    10 Yes 0 No

Post New Answer

More RPG400 Interview Questions

What is SFLNXTCHG keyword why it has used and where? Briefly explain with Example.

2 Answers   IBM,


what is ment by "MDT"

2 Answers   TCS,


When will DUMP & DEBUG be ignored?

3 Answers   IBM,


How to declare the dynamic(run time) array in rpgle? can you please give example

2 Answers   Polaris,


1.How to read a subfile in out put mode? 2.what are the keywords used to share same file? 3.using composite key which rpg code used?

3 Answers   HSBC,






The PGMA calls PGMB.PGMB generates a report.The report should contain the called program name(PGMA).How do i get the called program name in PGMB to print it on the spool file?(calling program name should NOT be hard coded or passed as parameter to called program?

6 Answers  


Can we have a Physical file without any member ? Please let me know

12 Answers  


I want to add 10 days in current date. how it is possible in CL program...?

11 Answers   CSC,


I have file with data as follows data 1 2 3 4 5 I need to read 1 and 5 ,then 2 and 4 then like.. upto end of file, can any one help on this

3 Answers   ISG,


are there any useful c runtime apis that I can call from rpg iv?

0 Answers   IBM,


I have a RPG program of 100 Lines and first line is to SETON indicator LR. Will the program execute rest of the 99 Lines?

6 Answers  


Can someone tell me tell me what is meant by message wait...?

1 Answers  


Categories