AS400 Interview Questions and Answers part 34

AS400 Interview Questions and Answers part 34
AS400 Interview Questions and Answers part 34, %FOUND, %EOF, NOT %EOF, %BOF, NOT %BOF, indicators, ile rpg, *ISO date, global variable, *STATUS=01218, check record lock in rpg, subroutine in rpg, begsr, endsr, plist, klist, sflcsrrrn, sflrcdnbr, activation group, epm, opm, original program mode, extended program model, ile vs rpg, subprocedure,  %EDITC, %EDITW, %CHAR, convert numeric to alpha in rpg
AS400 Interview Questions and Answers part 34

Q1:Which is the built in function to convert numeric field to alpha field?

Answer: %EDITC, %EDITW, %CHAR.

Q2:Subprocedures can use RPG cycle?

Answer: False.

Q3:Advantages of ILE over RPG?


  • In RPG it is one step compilation(get *PGm object) while in ILE-RPG it is two step compilation. (create *MODULE and then bind that module to a program)
  • In RPG recursive call is not supported while its supported in ILE RPG.
  • In ILE, we have extended factor 2, length of factor 1 and factor 2 is increased, free format is allowed, built-in functions avaialable.
  • In ILE, we have concept of Activation group.
  • In ILE, Extended program model (EPM) is implemented while in RPG original program model(OPM) is implemented.

    Answer: SFLCSRRRN will give the RRN of the record where the cursor is positioned however SFLRCDNBR will give the RRN of the first record displayed on the screen at a given time.

    Q5:PLIST vs KLIST?

    Answer: PLIST is a list of parameter and KLIST is the list of key fields.

    Q6:How to define a subroutine?

    Answer: BEGSR (Begin Subroutine) and ENDSR (End Subroutine) opcode are used to define subroutine. Instructions writeen between these two opcodes.

    Q7:How to determine if the record is in used by another user?

    Answer: With the help of status code *STATUS. If *STATUS = 01218 i.e. record already locked.

    Q8:What is the disadvantage of using gloabl variables?

    Answer: We cannot trace at which point the value of variable is changed.

    Q9:If we tried to move year part of *ISO date into a field of length 3, what will happen?

    Answer: Program crashes, as in case of *ISO format it requires field of 4,2,2.

    Q10:How to avoid using indicators in ILE?

    Answer: By using the standard built-in expression like %FOUND, %EOF, NOT %EOF, %BOF, NOT %BOF etc.

    Post a Comment

    © AS400 and SQL Tricks. All rights reserved. Developed by Jago Desain