Professional Documents
Culture Documents
As400 Interview Questions Answers - Part 3
As400 Interview Questions Answers - Part 3
Which of the following operations does NOT zero the field FLDA defined as 4,0?
Ans:
C MOVE *ZEROS FLDA
C Z-ADD *ZEROS FLDA
C Z-ADD 0 FLDA
C MOVE *ALL'0' FLDA
C SUB FLDA FLDA
C MOVE '0000' FLDA
C CLEAR FLDA
C MOVE *BLANKS FLDA
The last instruction does NOT zero the field FLDA.
How would you design the process for a nightly, high volume check producing process that needs to select
only records that are flagged to be processed?
Ans: With the help of OPNQRYF Clp command, we can select the records from the data base file. The process
involves following steps:
Steps: 1. OVRDBF with SHARE (*YES)
2. OPNQRYF
3. CALL the program
4. DLTOVR
5. CLOF
How would you join 3 separate fields, a first name, middle initial and last name together as 1 field with
proper spacing? You can describe in either RPG and/or RPG ILE (Integrated Language Environment)
Ans:
MOVE 'Dr. ' FNAME 3
MOVE 'JOHN' MNAME 4
MOVE 'WATSON' LNAME 6
FNAME CAT MNAME: 1 VAR1 8
VAR1 CAT LNAME:1 VAR2 15
DSPLY VAR2
MOVE *ON *INLR
When PGMA calls PGMB for the first time PGMB executes the *INZSR. PGMB uses the RETRN operation to
return to PGMA. When PGMA call PGMB the second time is the *INZSR executed?
Ans:If you specify RETRN in called program, the *INZSR will not execute again.
Show 2 ways to convert a date from YYMMDD to MMDDYY (MULT operation not acceptable)
PGM
DCL VAR(&VAR1) LENGTH(6) TYPE(*CHAR) VALUE('YYMMDD')
DCL VAR(&RCVD) LENGTH(6) TYPE(*CHAR)
DCL VAR(&VAR2) LENGTH(4) TYPE(*CHAR)
DCL VAR(&VAR3) LENGTH(2) TYPE(*CHAR)
CHGVAR VAR(&VAR2) VALUE(%SST(&VAR1 3 4))
CHGVAR VAR(&VAR3) VALUE(%SST(&VAR1 1 2))
CHGVAR VAR(&RCVD) VALUE(&VAR2 *CAT &VAR3)
SNDMSG MSG(&RCVD) TOUSR(*USRPRF)
ENDPGM
1
Define the purpose of Factor 1 the Operation Code and *IN15 in following code
HI LO EQ
C *YMD Test(D) yymmddDate 15
Ans:If the factor 1 value matches with factor2 value, the indicator specified in EQ comes *ON.
Define Subsystem?
Ans:Subsystem is nothing but it provides specialized environment to complete the execution of jobs.