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

Suppose my file has 10 fields and I want to make the 2nd field zeros in all records. And assume I have millions of records and I dont want to read each record and update the desired field with 0. Any other way to do this in one step operation?

1 Answers  


What would be the effect on the field where reverse image, underline and high intensity?

7 Answers   IBM,


1. What is bound-by-call and bound-by-reference? 2. Where and why is *Nomain used? 3. What are the difficulties faced by programmers when using service programs? 4. Explain the different ways of parsing and compiling XML in iSeries.

2 Answers  


What is the purpose of PUTOVR keyword?

2 Answers  


we are sending data of physical file to screen design and it is showing no record why?

1 Answers   NTT Data,






steps involved in debugging and types of debugging modes?

1 Answers  


Let?s consider a variable X of length 20. Move value ?ABC? to it.How to determine how many characters does X have?

1 Answers  


in which journalling which attributes are necessary

2 Answers   CTS,


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

2 Answers   Polaris,


how can we can we the data decimal error?how can we open such file in support

1 Answers  


Please tell me how to read the records from a file with load an array of size with error conditions(The logic answer for this question is ARR is array of 99 elements Z-ADD 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN99 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO).So,Please give me the complete of this code.

0 Answers  


I have a PF(ABC)with no key fields. PF(ABC)have 2 fields (cusno and cusname). Please let me know how can i read the cusno = 1150 directly from PF in CL and RPG program(Without creating the LF and without reading the complete file and then compare 1150)

3 Answers   Opus,


Categories