Interview questions:
[Link] are different types of files?
CPT files (equipment history)
Which uses high amount of transaction data.
DFLT functions
CRTOBJ
DLTOBJ
CHGOBJ
REF files(setup files with interface code and type)
CRTOBJ
DLTOBJ
CHGOBJ
SELRCD
EDTFIL
STR
[Link] types of file relations ?
OWNED BY
REFERS TO
[Link] are the 4 database functions ?
4 INTERNAL functions CRTOBJ,DLTOBJ,CHGOBJ,RTVOBJ
[Link] role of paramters
MAP
RST
POS
[Link] is the maximum length of parameter could be passed to a functions .
9 if more than 9 use array or a file.
2.I am creating a new function and only want CRTOBJ to be created what to do?
F7 option on the function
5. Create an array and want to use it what is the precaution to use?
How do we call non-synon function from synon program?
If I use same 2 programs in a program what happens?
2 subrotuines will be created.
What are the user points in EDTFIL , SEL RCD?
Which functions doesn’t have user points?
EXCEXTFUN
It can have user defined user points .
Which function needs return code to be defined explicity?
EXCEXTFUN
EXCINTFUNC
What are internal functions ?
They are meant to be used within a external function or any other function with
object name like diplay file, edit file. Internal functions are like common
subroutines which are created to be shared among different programs.
EXTUSRSRC
user-written high-level language source code is to be included within the source code generated by a
calling function.
EXTUSRPGM
Return code needs to be set explicitly.
You cannot specify Neither (N) type parameter for this function type; however, you may specify
Varying (VRY) role parameters
Types of Role.
1. R - Restricted. Function will read access path to find exact matching record.
2. M - Map. Function will read access path from the beginning.
3. P - Position. Function will read access path to find closedst matching record.
Types of Usage.
1. I - Input. Parameter will be passed as input.
2. O - Output. Parameter will be used as output means this "Display racing
results" function will return value in this parameter.
3. B - Both. Parameter will used to pass value and return value both.
4. N - Neither. Parameter will not be used.
5. D - Drop. Parameter is dropped and can not be used.
How do you create a file in synon.
YSTRY2 hrmdl command use cheyyandi
also make sure
X1SY, X2SY, HRGEN, HRMDL added to libl
What happens if a pgm is called twice in synon program?
2 subroutines will be created.
* Check Horse is a Sire(M) - Horse for giri *
C EXSR SARVGN
* Check Horse is a Sire(M) - Horse for giri *
C EXSR SBRVGN
Type of context fields in synon?
File transfer SFTP
KANBAN BOARD IS USED
JIRA
Tools used are :
IMPL
ALDON
TURNOVER
Topics to be prepared
PF
LEVEL CHECK ERROR
SQLRPGLE
DEBUG
SERVICE PROGRAMS , MODULES
ACTIVATION GROUPS
Previous interview questions:
How to access member of a particular file.
OPNQRYF
CHGPF
DFTACTGRP
TYPE OF ARRAYS
DATA STRUCTURES
WHAT IS ACCESS PATH
PRINT FILES
CL
Types of errors in CL
COMMAND LEVEL
PROGRAM LEVEL
What is signature erroe
How to add field to a FILE
Error handling in RPGLE
*PSSR
ON ERROR
CONSTRAINTS IN PF
ACCESS MEMBER OF A FILE
IF A JOBS GOES INTO MSGW ,what are all the options
CHGPF
SUBSYSTEM
WRKSYSSTS
Why subsystem? To dividie the allocation of resources.
How job goes into QBATCH or QINTER subsystem?
JOB into QUEUE WRKJOBQ
SUBSYSTEM(PROCESSING THE JOB)
OUTQ
WHY OUTQ
Initially as400 desgined to print everything.
PHYSICAL FILE
Access member of a physical file.
Add fields to a file.
OPNQRYF
CHGPF *MAP *DROP
INTERVIEW QUESTIONS
PART-1
1-How SFLSIZ and SFLPAG differs with all 3 types of Subfiles?
SFLPAG number of records on page.
Types of subfiles :
single page , SFLPAG= SFLSIZ no limitation on SFLSIZ size
LOAD SFLPAG number of records on screen and when page down we are clearing buffer.
load all SFLPAG<SFLSIZ SFLSIZ 9999
, xpandable SFLPAG<SFLSIZ SFLZSIZ 9999
LOAD SFLPAG number of records on screen and when page down we are not clearing
[Link] is growing
2-How to identify whether any job is interactive or batch in CL, in RPG and normally?
Jobs with status BCH and INT USING Command WRKACTJOB TYPE COLUMN
In CL –RTVJOBA , check for parameter TYPE value 0 means batch and vaue 1 interactive
In RPG API QUSRJOBI field QUSJT04 which contains value for job B batch I interactive.
3-How will I explicitly open a file in RPG program?
USROPN in Fspecs %OPEN(F1) , %CLOSE(F1)
4-How do you set pointer to some value or its next or higher value?
SETGT in RPG
5-How can we execute a job in AS400?
SBMJOB
6-How can we translate values from lower to upper in RPG and Embedded SQL in RPG?
%XLATE
Upper function in SQLRPGLE.
7-How can we write and read a value using DSPF in CL program?
SNDRCVF command in CL ,
8-How to check end of file in CL?
Mon msg CP0864 for EOF
9-Can u update a database file in CL?
No UPDATE OR INSERT
We can use OPNQRYF
10-How do u monitor the message in CL?
MONMSG MSGID(CPF0000)
11-What is CA and CF and difference between them?
Answer:
CA-COMMAND ATTENTION like F12 to exit.
COMMAND FUNCTION passes values from one screen to another.
Like F6 to add
12-What can we done from O specs in RPG?
Report design
Insert records in a file
13-What is *PSSR?
Program status sub routine
System exception handling invoked automatically when error occurred.
14-Why we use *INLR = *ON?
Is an indicator set explicitly
To free rsoucesor memory like variables, files
15-What we called the program variable used with embedded SQL?
HOST VARIABLES
16-How to find dependent of a file in AS400?
DSPDBR
17-What is the length of the variable in DCL VAR(&VAR1) TYPE (*CHAR)?
Default length for a variable is 32
18-What is the length of the variable in DCL VAR(&VAR2) TYPE (*DEC)?
Default length is 15.5
19-What is the disadvantage of a global variable in AS400?
Accessing of varialbes globally outside procedures and result in garbage value
20-How can we avoid using indicators in RPG?
BY USING BIF
%FOUND, %EOF , %NOTEOF
PART-2
1-Which library gets loaded first when we login to IBM i?
2-How to see all the objects in library and its size?
Rklib and take 12
3-How to check all members of a file?
dspdbr
4-How to see all record formats used in a file?
dspfd
5-How to change the record size of a PF?
chgpf
6-Why we use USROPN keyword in RPGLE?
To open file explicitly
7-Why we use EXTMBR keyword in RPGLE?
EXTMBR(‘MEMBERNAME)
EXTMBR(‘ALL)
8-What is the purpose of using Varying? D Var1 S 10A Varying /Free Var1 = 'HELLO'; /End-Free 9-
What is CPF4131?
DYNAMICALLY ALLOCATON OF LENGTH
10-Difference between CRTDUPOBJ and CPYF command?
11-Mandatory keywords for subfile?
SFLCTL
SFLDSP
SFLPAG
SFLSIZ
SFL
12-Difference between PLIST and KLIST?
PLIST – all parameters
KLIST – LIST OF KEYS
13-Difference between *INLR = *ON and RETURN?
INLR
FREE VARIABLES OR RELEASE RESOURCES
CLOSES FILE
CLEAR MEMORY
14-What is the effective use and side effects of *INLR? How to overcome the side effects? Example
use case scenario?
AGAIN FILE HAS TO BE OPENED , ASSIGN OF VARIABLES
Activation group
RCLLAIM IN activation group
Ends all program running in activation group
15-What operations we can perform on Indicators?
SETOFF(0) and SETON(1)
16-How to check if a record is locked in RPGLE?
*STATUS FIELD IN INFDS 01218
17-How can we execute a CL command from within RPG program without calling a CL program?
QCMDEXC API
SYSTEM C API
QCAPCMD
18-Can we use a file with same file and record format name in RPGLE?
No, BUT THIS CAN BE DONE BY REMANMING THE RECORD FORMAT IN FSPECS
19-What are those commands which can only be executed in CL program but not in RPG program?
RTV* which retrieves some value cannot be used in RPG
20-How to retrieve RRN value of the file record in RPGLE?
INFDS IN SPECS DECARE RRN IN
PART-3
1-What is the maximum length of a variable name in CL program?
2-How can we display data from a flat file?
3-Difference between READC and SFLNXTCHG?
4-Difference between ITER and DO?
5-Difference between RENAME and PREFIX?
6-How to debug a job which is in MSGW state?
7-How do u pass parameters in CL program?
8-What is a Spool file?
9-What does EXFMT does?
10-What is the default data type of DS subfields in RPGLE?
11-What is the default data type for decimal 0 in PF?
12-Difference between Packed and Zoned decimal?
13-Difference between DOW and DOU loop?
14-How do u read a DSPF and Database file in CL program?
15-How do u declare more than one file in CL program?
16-How do u declare a file with graphic fields in CL program?
17-Why we use %SST in CL program?
18-Difference between SFLPAG and SFLSIZ?
19-Is module executable?
20-Can we call a module?
ILE Concepts
SERVICE PROGRAM
BINDER LAGNUAGE
STRPGMEXP
SINGATURE
ACTIVATION GROUP
CL
MONMSGS
RMVM
CLPFM
CHKOBJ
CPYFRMIMPF
CPYTOIMPF
OVRDBF
ADDPFM
OPNQRYF
CLOF
What is JOBD in AS400
Its main purpose is to control the access of library list by the job.
JOBD:
Its has scheduling priority,routing data,message queue severity,library list information and output
information.
CRTJOBD
DSPJOBD
PART-12
[Link] is commitment control in RPG?
File has to be journalled
CRTJRNPRCV
CRTJRNPF
STRJRNPF
STRJRNRCV
STRSMTCTL
ENDCMTCTL
In rpgle
COMMIT
ROLLBACK
[Link] happens if SFLSIZE=SFLPAG?
Single page SFL
Adv:LOAD any number of recods no limit of 9999 unlike other SFL
Disdav: page up and page down needs to be handled
[Link] cycle of RPGLE?
Read a file
Process file
Write the file
[Link] is flat file?
No DDS but it has record length.
Program described flat file in RPGLE has fixed length
FILE NAME,records format name and field name is same.
No need to read file in RPG program if defined in Fspces.
5.*INZSR ?
Initlaization subroutine.
No need to call, executes automatically
[Link] command or CLP command to find if a field is character rfield or decimal?
TESTN
[Link] to check existina ce of record?
SETLL
[Link] types?
Attrbutes of fields,
[Link] operations in AS400
%lookup,SORTA,XFOOT(SUM UP VALUES OF ARRAY),MOVEA
[Link] rpg using strisdb?
Yes , ILE no
[Link] file field renames in as400?
Like.
PART 6:
[Link] do we use CLOF command?
To close any file opened by user explicitly
OPNQRYF
OPNDBF
[Link] and CHKOBJ?
3What does pgmref do
List out all objects used in program
[Link] cant we use RTV commands on command line?
We need a variable to hold the return values .
Used only in CL not in RPGLE or on command line.
[Link] recursion allowed in CL?
Yes
[Link] all the objects needs to be present during the CL file compilation?
Files and command must exist
[Link] are the different ways to pass data between programs and which is the efficient way?
Parms
Dataarea
MSGQ
DTAQ ------ efficient
Files
[Link] are the ways to view programs?
2 , 5 are used
DSPPFM
[Link] RUNQRY command display the records but it is not possible to find a particular string in the
file records, as find option is not [Link] there any way out?
WE by set te RCDSLT option as *YES.
[Link] we pass numeric variable for call to program from command line?
Pass hexadecimal value. Call pgm(a(X’25’F)
[Link] command is used to clear a physical file?
CLRPFM
[Link] it possible to have separate description for a nobject of [Link]
During compilation
[Link] I use CPYF to copy a logical file?
Yes , it would create a PF.
[Link] files on a physical file ?
DSPDBR
[Link] cound in RUNQRY file?
Yes OUTFORM(*SUMMARY)
[Link] a record based on criteria in RUNQRY ?
Yes
Part – 10
[Link] are the valid user defined data area types?
*Char
*logical
*decimal
*ddm – refer data area present in other system.
[Link] is multi-format logical files?
Types of logical files
Single format
Multiple format
Logical files created with multiple records formats.
[Link] is the SELECT and OMIT criteria in logical files?
Way of designing filters on logical files.
[Link] fields be concatenated in logical file level?
Yes using CONCAT
06When do we use ALL keyword?
SELECT AND OMIT CRITERIA
What is difference between CAT,BCAT,TCAT?
CAT – concatenate 2 strings as it is
TCAT – trim blank from 1st string , insert one space and concatenate 2nd string.
BCAT – trim blank from 1st string , concatenate 2nd string
[Link] which specs report layout is defined?
O specs
[Link] purpose?
SELECT , UPDATE,INSERT
[Link] are unqiue constraints execute?
Insert the records
[Link] referential constraints executed?
Insert, delete and update
[Link] cursor declare statement used?
Specify name of cursor , define cursor and specify row to be fetched?
[Link] CL command is used at program execution to redirect the files to RPG program.
OVRDBF
[Link] to write *pssr?
*pssr begsr
Move a = 0,
Endsr
[Link] is PR and PI?
Procedure prototype
Definition structure/ for calling the procedure.
Procedure interface
Define paramters (receive/return)
[Link] the EDTCDE/EDTWRD?
EDTCDE -Formatting keywords
– cannot be used with characters data type.
(Y – date field)
Z suppressing leading zeroes
EDTWRD – formatting keyword
Depend on user how this can be used
[Link] keyword is used when screen is redisplayed?
CRTDSPF
RSTDSP = *YES
[Link] is OVERLAY?
Field A is overlayed with values of B but A vales are retained.
[Link] between VIEW and INDEX?
LF with no key is a view.
LF with key is index.
[Link] keywords of subfiles?
SFLSIZ
SFLPAG
SFL
SFLCTL
SFLDSP
[Link] is %LOOKUP code?
Opcode to search in an array.
Part – 13 ILE Concepts
[Link] you define 2 QSYSPRT ina single program?
Program described printer file. Bu we can declare only 1.
[Link] can you define a blank subfile?
SFLDSP should be ON which means we have to display subfile.
[Link] do you get decimal data error ?
If in numeric we get char ..like in move .
Bad data like numberic field is not intialized
[Link] are the types of subfiles?
Single page SFLPAG = SFLSIZ
Load all
expandable
[Link] mandatory keywords?
SFL
SFLDSP
SFLCTL
SFLPAG
SFLSIZ
[Link] between SFLCLR and SFLINZ?
Clears data loaded in subfile
Clears data loaded and then initializes variables
[Link] between EXCPT and WRITE?
EXCPT to write on PF in printer files
[Link] is CLEAR and RESET?
Clear – clears variable
Reset - a s 1 inz(N)
Eval A = ‘Y’
Reset
Now value of A is N
[Link] is binding directory?
List of service programs and modules
Same like library list
[Link] we receive signature violation error?
Occurs when signature of service program does not match with the calling program
When does signature of a program changes?
[Link] is binder language?
List out the exported procedures.
[Link] is PEP and UEP?
Program entry procedures when we don’t know what module to call first , in that case module in
PEP is called first
User entry procedures
12a. Which command is used to replace modules of an ILE BOUND PROGRAM with other modules
on the system, without recompiling programs?
UPDPGM
[Link] ou import and export data between 2 programs?
Export symbol
[Link] between CALL , CALLB and CALLP?
CALL synamic call
Control gets transferred to calling pgm
CALLB,CALLP STATIC
To call modules and procedures
CALLP to call procedure for programs with nomain
If program has 1 default procedure and main module used CALLB
[Link] used to build service program?
CRSTSRVPGM
[Link] is bind by reference?
MODULE ATTACHED TO SRVPGM – BIND BY REFERENCE
MODULE ATTACHED TO PROGRAM – BIND BY COPY
[Link] is a module?
A non-executable program.
Needed to bebinded to program or srvpgm
What is activation group in ILE?
Subset of job and resources are taken in run this env.
Types *new , *caller and*ENTMOD - *NAMED
18 .When does signature of a srvpgm changes?
What different ways to read a multimember PF?
OPNQRYF
OVRDBF
What are different ways to pass data between 2 programs
How to check if all parameters are passed to PROGRAM B from PROGRAM A?