AS400 Interview Practice Questions for IBM i developer

This article contain as400 interview questions set for IBM i developer
AS400 Interview Practice Questions for IBM i developer, as400 interview questions, ibmi interview questions, multiple choice questions, PREFIX keyword in RPG, PREFIX, DATEIT, H-spec in RPG,datedit(*mdy) in RPG H spec,OPTIONS keyword in ILE RPG, %CHAR bif, RPG Built-in function,EVALR,operation codes is supported in both fixed-form and free form RPG, ADDDUR in RPG, standalone variable vs. constant in RPG,READ in RPG, CHAIN in RPG, operation code extender in RPG,USROPN,%ELEM built-in function in RPG, %EOF built-in function, %EOF, bif, built-in function
AS400 Interview Practice Questions for IBM i developer

Q1: Which of the following is the result of using PREFIX(XX:2) on a File Definition specification line for a file FILE01 that has one field named FIELD1?

  1. file FILE01 is renamed to XXLE01
  2. field FIELD1 is renamed to XXELD1
  3. field FIELD1 is renamed to XXFIELD1
  4. field FIELD1 is renamed to FXXIELD1e

Answer 1:

2. field FIELD1 is renamed to XXELD1

Q2:Given the following H-spec.
 h datedit(*mdy)
Which of the following test whether a job started prior to midnight and still running after midnight

  1. if udate=<%date();
  2. if *%date;
  3. if %date(udate*mdy)<%date();
  4. if %date(*date*mdy)<%date();

Answer 2:

3. if %date(udate*mdy)<%date();

Q3:Which of the following contains only valid File Specification keywords?

  1. IGNORE, MAXDEV, SFLLIN
  2. SFILE, CALLP, INCLUDE
  3. NDSP, INFDS, PREFIX
  4. PGMNAME, PLIST, RECNO
  5. None of the above

Answer 3:

5. None of the above

Q4:Which of the following is the correct calculation for adding 23 days to date field CURDATE?

  1. ADDUR 23:*DAYS CURDATE
  2. ADDDUR 23:*DAY CURDATE
  3. ADDDUR 23:*D CURDATE
  4. ADDDAY 23 CURDATE

Answer 4:

3. ADDDUR 23:*D CURDATE

Q5:Procedure PROC1 in a Service Program must be called passing to it a 5 position field. Which of the following code segments will accomplish this task?

  1. D AField S 5A
    C CallPrc 'PROC1'
    C Parm AField
  2. D AField S 5A
    C Call 'PROC1'
    C Parm AField
  3. D Proc1 PR
    D MyField 5A
    D AField S 5A
    C CallP Proc1(AField)
    
  4. D Proc1 PR ExtPgm('PROC1')
    D MyField 5A
    D AField S 5A
    C CallP Proc1(MyField)

Answer 5:

3.
D Proc1 PR
D MyField 5A
D AField S 5A
C CallP Proc1(AField)

Q6:Which of the following is the OPTIONS keyword on a Definition specification used to specify?

  1. Parameter Passing Options
  2. Compilation Options
  3. Program Initialization Options
  4. Date Format Options

Answer 6:

1. Parameter Passing Options

Q7:What type of values can be used with the %CHAR built-in function?

  1. character
  2. numeric
  3. date
  4. all of the above

Answer 7:

2. numeric

Q8:Which of the following operation codes is supported in both fixed-form and free form?

  1. CALL
  2. EVALR
  3. ALLOC
  4. EXTRCT

Answer 8:

2. EVALR

Q9:Which of the following statements will extract the state code 'MA' out of the text field CITYST which contains 'BOSTON MA'?

  1. Movel cityst state
  2. Eval state = %TRIML(cityst:7)
  3. Eval state = %SUBST(cityst:8:2)
  4. Eval state = %TRIMR(cityst:8:10)

Answer 9:

3. Eval state = %SUBST(cityst:8:2)

Q10:Which of the following SQL statements, when used by itself in an RPG program, can take the place of a File Specification, a key, and a CHAIN?

  1. FETCH
  2. SELECT INTO
  3. DECLARE CURSOR
  4. PREPARE STATEMENT

Answer 10:

1. FETCH

Q11:In a D specification what do 'Standalone' and 'Constant' describe?

  1. the declaration type
  2. the internal data type
  3. the data structure type
  4. the subroutine type

Answer 11:

1. the declaration type

Q12:Which of the following is the operation code extender for not locking a record on a READ or CHAIN?

  1. L
  2. N
  3. E
  4. P

Answer 12:

2. N

Q13:Which of the following is the File Specification keyword that causes a file not to be opened at program initialization?

  1. USER
  2. USEROPEN
  3. USROPN
  4. OPEN

Answer 13:

3. USROPN

Q14:What is the purpose of the %ELEM built-in function?

  1. to return the number of used elements in an array
  2. to return the value of the current array index
  3. to return the number of elements in an array
  4. to return the number of uninitialized elements in an array

Answer 14:

3. to return the number of elements in an array

Q15:Which of the following parameters can be used with the %EOF built-in function?

  1. record format name only
  2. file name only
  3. record format in filename and filename
  4. indicator

Answer 15:

3. record format in filename and filename

Post a Comment

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