You are on page 1of 48


com/doc/12305285/IBM-AS400-Interview-Question ================
= AS\400 Interview Questions 1. Define a shared access path? To share the open d
ata path by various programs in a same job. 2. What is the difference between ar
ray and a multiple occurrence data structure? The values stored in array donâ t vary.
In the other hand, we can store the Different values in same variables at vario
us stages. 3. What is *INZSR used for? It is special type of RPG/400 subroutine,
which is executed automatically at beginning of the program. It is a good place
to code initializes the variables. 4. How can you execute a command from within
an RPG program without calling a CLP program? By calling QCMDEXC application pr
ogram interface we can execute a CL command with in an RPG program. 5. What is t
he purpose of the "N" in the following calculation specification? C KEY CHAIN FI
LE N 99 If you specify 'N' in 53rd position, the record will not be locked if yo
u try to read the locked record. It is a way of avoiding the record lock. 6. Whi
ch of the following operations does NOT zero the field FLDA defined as 4,0? C C
The last instruction does NOT zero the field FLDA. 7. How can you check for a re
cords existence without causing and I/O (CHAIN/READ)? With the help of File Info
rmation Data Structure, we can check existence of records in a physical file. Th
e code is described below: In File description continuation line (IPFK), KINFDS
RCDS IRCDS DS I *RECORD #RCDS with the above code we can check the existence of
records in a file without causing I/O operation. 8. Define what a data area is a
long with a brief example of what it may be used for?

Data area is a storage area to store limited information. Example: a new and uni
que customer number is generated whenever a new customer is added to customer ma
ster file. Data area keeps track of last record added and add 1 to it. Through p
rogram we can access new customer number. 9. Define what a data queue is along w
ith a brief example of what it may be used for? Data queues provides communicati
on between programs by calling API's QSNDDTAQ and QRCVDTAQ along with parameters
like data queue name, library in which data queue exists, variable to store the
number of characters to be sent, variable to store the information to be sent.
We can send the same data queue to the many programs. 10. What is the purpose of
the following? I 'CLOSED' C STAT01 I 'OPEN' C STAT02 It is a type of initializi
ng the variables in I-spec. and these are further used in C-spec. 11. What is th
e difference between UDATE and the system date? UDATE supports two-digit year. T
he format is *MDY (MMDDYY). *DATE (system date) supports four digit year. The fo
rmat is *MDYY (MMDDYYYY). 12. List some of the commonly used commands for debugg
ing STRDBG(for batch jobs), STRISDB. 13. Define the RCVF command? RCVF command u
sed to receive the records either from the data base file or device file. 14. De
fine the To extract the 15. Define the To concatenate purpose of the %SST functi
on? information from the specified string. purpose of the *CAT function? the two
strings into a one string.
16. Define the purpose of the *BCAT function? To concatenate the two strings by
placing a single blank in a resultant. 17. Describe the difference between the D
OWxx and DOUxx operations? DOWxx : If the condition becomes true, then only the
group of instructions allowed executing. DOUxx : Irrespective of condition, it w
ill execute at least one time. 18. Define the purpose of the LEAVE operation? If
you specify LEAVE, the control transfers to the statement below the ENDDO. 19.
Define the purpose of the ITER operation? If you specify the ITER, the groups of
statements are allowed to execute repeatedly. 20. List the steps/commands neces
sary to accomplish the following:

a. Copy data from the file b. The file ORDHIST may or c. If the file ORDHDR does
d. The file ORDHIST may or old data should be erased Commands: a. b. CPYF FILE
ORDHDR into file ORDHIST may not exist exist, it may or may not contain data may
not contain data, if the file does contain data the
21. What is the purpose of the following? FORDHDR1 IF E K DISK ORDHDRF KRENAMEOR
DHDRF1 In order to rename the record format of a data base file in a program, we
can use the above steps. Purpose of renaming is: If the record format name is s
imilar in two files and if both are used in a same program, the program will not
compile. Hence we have to rename either of the file. 22. What is the purpose of
the following C/COPY QRPGSRC,ORDERR During the compilation the source code of O
RDERR copy book is copied into the existing program. Where as /COPY is compiler
directive statement. 23. What is the purpose of the following FORDHDR1 CF E WORK
STN $2SFN SFILE FMT2 The above line indicates that, $2SFN is a relative record n
umber and FMT2 is name of the subfile record format. 24. What is the purpose of
the following I UDS I 1 60ORDER# I 7 90LINE# The purpose is to define the variab
les in I-Spec and these are further used in Cspec. Where as â Uâ
indicates data area data
structure? The above code is used to update the data area value through the pro
gram. The letter "U" indicates that the defined data structure is a data area da
ta structure. 25. What is the purpose of the following? A CSRLOC (F1ROW F1COL) U
sing this record level keyword, you can specify cursor location on an output ope
ration to the record format you are defining. The program sends output after set
ting the cursor location. 26. What is the difference between SFLCLR and SFLINZ?
SFLCLR : It clears the subfile. SFLINZ : First it clears the subfile and initili
azing the numeric variables with

zeros and alphanumeric variables with characters. 27. Define the purpose/use for
SFLRNA? Using this, we can make specified subfile record format inactive. 28. D
efine what the operation will do, the purpose of the result field and the purpos
e of *IN66? HI LO EQ C CALL 'CVTDAT' DTPRM 66 The above statement causes, call t
he program and pass the parameter. 29. Define each of the following operation co
des a. b. c. d. e. READ To read the records sequentially. READE To read the equa
l key records READP To read the previous records READC To read the records from
the workstation file (Subfile). REDEP To read the equal key previous records.
30. Define the purpose of the following code (If you know, how would this be wri
PGM1 PRM C ENDDO Whenever the indicator *IN66 becomes *OFF, the control transfer
s after ENDDO statement. Otherwise, it reads the records from the data base file
based on indicator specified on HI position. If the specified indicator on LO p
osition becomes *OFF, then only CALL statement will execute. 31. How do you set
the keywords SFLSIZ and SFLPAG if you want the subfile to dynamically expand? SF
LSIZ > SFLPAG. 32. When would you use or not use this approach? It is the most d
esirable method in building a real time applications. We can use at all the time
s. 33. How can you detect and handle a record lock situation? If you try to read
the locked record, we can get system defined message i. e. , the program will e
nded abnormally. With the help of File Information Data Structure we can handle
record lock situation. Generally it will happen, when the same file of type " U"
used in different programs. 34. How can you detect overflow for a print program
that prints multiple lines per cycle? You specify the indicators OA through OG
and OV in 33 - 34 columns in a printer file. This indicator automatically set on
whenever overflow occurs on a type of page.

d. the *INZSR will not execute a gain. ' 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 37. high volume check producing process that needs to select only records that are flagged to be processed? With the help of OPNQRYF Clp command. Determine the value of the result field a. middle initial and last name together as 1 field with pro per spacing? You can describe in either RPG and/or RPG ILE (Integrated Language Environment) MOVE 'Dr. 0$ .Sale = 1. When PGMA call PGMB the second time is the *INZSR executed? If you specify RETRN in called program. Cost = $110. c. we can select the records from the data base f ile. b . The process involves following steps: Steps: 1. OVRDBF with SHARE (*YES) 2. How would you join 3 separate fields. 00 Tax = 20% MarkUp= 05% Sale = 10% C Eval TotalCost = ((Cost * MarkUp) * Tax)) . a first name. How would you design the process for a nightly. When PGMA calls PGMB for the first time PGMB executes the *INZSR. 38. PGMB uses the RETR N operation to return to PGMA. OPNQRYF 3. Show 2 ways to convert a date from YYMMDD to MMDDYY (MULT operation no t acceptable) 1) CVTDAT DATE() RTNVAR( ) FROMFMT( ) TOFMT( ) Source code is requ ired to convert from one date format to another date format. DLTOVR 5.35. The source code in CLP is given below: 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 M SG(&RCVD) TOUSR(*USRPRF) ENDPGM 39. CLOF 36. CALL the program 4.

44. Define the purpose of Factor 1 the Operation Code and *IN15 in following cod e HI LO EQ C *YMD Test(D) yymmddDate 15 If the factor 1 value matches with facto r2 value. QINTER. 49. A query report can be: * displayed on a workstation (screen) . Describe the function of SETLL operation in RPG language? The SETLL operation positions a file at the nex t record with a key or relative record number that is greater than or equal to k ey or relative record number specified in factor1. What is the function of CRTDUPOBJ comman d? To create the replica from the original object. Define a Job Queue? Job queues are queues of batch jobs waiting to be pr ocessed. 46. QCMN. What is the function of CPYSPLF command? It copies the spooled f ile to the data base file. 42. 51. 48. * The job is creat ed (job name is assigned. What is the purpose of Level Check p arameter in a Physical file? Specifies whether the level identifiers of the reco rd formats in the physical file are checked when the file is opened by the progr am. 52. the indicator specified in EQ comes *ON. * Output generated by the batch job is placed on an output queue. 45. QBASE. Define a Batch Job? * A user request the job.40. 41. Define Subsystem? Subsyst em is nothing but it provides specialized environment to complete the execution of jobs. Describe the function of SETGT operation in RPG language? The SETGT operation positions a file at the nex t record with a key or relative record number that is greater than key or relati ve record number specified in factor 1. 47. Q CTL. 50. Describe about Query/400? Que ry/400 is a licensed program that uses a query to analyze and select the informa tion contained in the data base files and create a query report. What is the function of CPYF command? To copy the data from the one file to another. 43. QSPL. What are different types of Substems? QBATCH. * The spool sub system prints the output on the output queue. Define a Output Queue? Output queues are queues of jobs waiting to be printed. job attributes are allocated) * The job is placed on a job queue * The sub system QBATCH takes the job from job queue and starts it.

*ST ATUS. *ROUTINE. *OPCODE. 53. What is the difference between access path and Dynamic select? Dynamic selec t occurs whenever the program reads file. List and explain th e different type of data structures? * Data area data structure When the data ar ea is defined in an RPG/400 program as a data area data structure. *PARMS are supported by a program status data structur e. Note that a ny code greater than 00099 is flagged as an exception/error. This type of data structur e contains pre defined sub fields that identify * The name of the file for which the error occurred * The record processed when the error occurred * The operati on being processed when the error occurred * The status code number * The RPG/40 0 routine in which the error occurred. * File information data structure A file information data structure provides exception/error information that may be occu rred when processing a file during program execution. I n the data area data structure. *S TATUS. Specifically. Define Data Structure? Data structures are specifie d in the Input specifications of an RPG/400 program to define an area in storage and layouts of related sub fields. Exception errors may be controlled by tes ting for an error code in the *STATUS field which is included in a file informat ion data structure.* printed * stored in another database file. 57. *PROGRAM. *ROUTINE provide the previously named information. 56. 55. What is the CLP command to acce ss a Query/400? WRKQRY 54. Four keywords . But access path occurs . 58. keywords including *FILE. Purpose of Overrides? The basic purpose of Overrides is to temporarily change the attributes of a file. If you specify this in a file record selection until the program reads fi le. So you don't have to create p ermanent files for every combination of attributes your application might need. it selects the records from the specified file. What is the purpose of Data structure? * Divide a field in to sub fields * Change the format of a field * Group non-cont iguous data in a contiguous format * Define an area of storage in more than one format * Define Multiple occurrences of data structures. Overrides gives you the flexibility to use existing model files and dynamically change their attributes. What is the purpose of DYNSLT This is a file level keyword used level. * Program status data structure Program status data structure however identity exception/errors that a re generated in the program by RPG/400 operations and not by a file. 59. th e system doesn't perform Then on the Select/Omit criteria. its data is i mplicitly retrieved for processing and written back at the end of the program. letter "U" must be entered to define the data st ructure as a data area data structure. *RECORD. keyword? in a logical file.

Logical file contains more than one record format. RGZPFM? Even if you delete the records in a physical file through the prog ram. When would you prefer logical file than OPNQR YF? The physical file you are working with very large. What is the purpose of reorganizing the physical file i. Join logical fil e contains only one record format. e. Record format name in join logical file shoul d be different. 62 .before the file is read (but not necessarily). 60. Attributes like * Maximum number of me mbers * Member size * Level check enforced * Open data path is shared . LIFO. still the space used by the deleted records not used by the other purpose. The purpose of each one is described below: records will retrieved in first in first out order. 64. 65. creating and using a logi cal file will allow an application to perform faster than using an open query fi le. What i s the purpose of CHGPF (Change physical file) command? CHGPF command is used to change the attributes of a physical file. Why would you prefer OPNQRYF than logical file? The ma in difference is : Logical file creates permanent object on the system. . 61. Logical file doesn't contains data but it provides view from the phys ical file. records w ill retrieved in first changed first out order. What is the difference between regular logical file and join logical file? R egular logical file contains more than one record format. whi ch contains field definitions and descriptions. records will retrieved in last in first out order. Record format name in regular logical file should be same based on the physical file. FCFO? at file lev el. Throu gh join logical file we can't made changes in physical file. Phys ical contains data derived by the field reference file. Through logical file we can made changes in physical file. Hence using RGZPFM command we can compress the deleted records space. applications t hat use an access path frequently will be more efficient using a logical file. Since access paths created by open query files are temporary. What is the necessar y keyword used in a physical file to refer field definitions from the field refe rence file? REF which is a file level keyword is necessary to define at file lev el in a physical file. What the purpose of These keywords are used FIFO: The duplicate key LIFO: The duplicate key FCFO: The duplicate key the keywords FIFO. s ince the access path will not have to be rebuilt every time the file is open. 63. Distinguish bet ween logical file and physical file? Physical file contains only one record form at. 66. What is field reference file? Field reference file is a file. Physical file contains ac tual data. 68. The syntax is as follows: REF(library name/name of the fi eld reference file) 67. OPNQRYF creates temporary access path. Because access path maintenance p erformed on the file. and it doesn't have member.

78. This order is not changed. In fully procedural file the records will be read and processed in any order. Rebuild. Because internal indicator MDT would be off.74 in a f ile description specification indicating that user control on a file. What are the different types of access paths maintained on the file? Immediate: All the access paths (open a nd close) associated with a file will be updated whenever changes made to a file . SFLMSGKEY. What are necessary keywords to code message subfile? SFLMSGRCD. What is the difference between production library and test library ? In deb ug mode. Table: Table is stored at the begining of the input records. Hence you should be explicitly set on the MDT by SFLNXTCHG keyword. the internal indicator MDT (modified data tag) is automatic ally set off by the system. the files exists in production library not allowed to update.69. Rebuild takes place whenever remaining access paths will be open. The logic f low is controlled by the opcodes in RPG program. What is purpose of declarative statement DEFN? Depends on the factor 1 value it will do two things: * If the factor1is *LIKE then DEFN opcode defines the ne w field based on the attributes old field.only open access paths will update whenever changes made to the file. Table: Table can be searched consecutively. What is the difference be tween Array and Table? Array: Array is stored any where in the body of the input records. What is difference b etween fully procedural file and primary file? In primary file the records will be read and processed from begining to end. 79. Array: We can access all the elements in array by specifying the array name. In the ot her hand. all the files used in program will remain open. When will you use OPEN and CLOSE opcodes in RPG program? If you specify the letter "U" at columns 73 . If you perform read on the subfile. SFLPGMQ 77. 72. What is messag e subfile? Message subfile is special file contains multiple messages taken from program message queue and placed in message sub file for display on the screen. Hence we h ave to explicitly open and close the file in a program. recor ds won't be read. the files exists in test library allowed to update. * If the factor 1 is *NAMVAR then DEF N opcodes defines the field as a data area. Table: Only one table element can be accessed at a time. 70. What is the purpose of SFLNXTCHG keyword in a subfile? Which is a subfile record format keyword. How can you identify End of file in CLP program? Wi th the help of MONMSG MSGID(CPF0864) we can identify end of file in clp program. 76. If you specify RETRN. If you again perform read on the same records. all the files used in program will be closed. 74. . What is the difference between SETON LR and RETRN? If you specify SE TON LR. Array: Array can be searched random ly. Delay : Rebui ld will not takes place. 73. 75. 71.

84. 85. 2: If the data area object not found. * The output generated by the int eractive job is placed on the output queue * The spool sub system QSPL prints th e output. and yo u can specify more than one attribute for the same keyword. 3. The field definitions and descriptions are d efined in side the program in a program described file. It is always good C LP programming approach to check the object before you rename. the MONMSG command executes with the help of mes sage identifier.80.+ data extracted') ENDDO RTVD TAARA DTAARA(JBA001DT *ALL) RTNVAR (&FROMDATE) The execution of above steps is l isted below: steps 1: First it checks the data area object on the system. You can specify the DSPATR keyword more than once for the same field. How can you check the existence of object in a system? With the he lp of CHKOBJ clp command. control transfers to statement below ENDDO. What is the purpose of SFLFOLD and SFLDROP keywords? SFLFOLD: To fold the second line of multiple line subfile. 81. How ma ny secondary files allowed in a program? More than one secondary files are allow ed in a program. we can RTVMBRD command. What is the purpose of RTVMBRD command? In order to access the information related to member. * Job is placed on a job queue. 88. What is the purpose of FRCDTA (Force Data) keyword? Use thi s record-level keyword to immediately display a record format. The following are va lid attributes: . The usa ge of command in clp is as follows: CHKOBJ OBJ(JBA001DT) OBJTYPE(*DTAARA) MONMSG MSGID(CPF9801) EXEC(DO) CRTDTAARA DTAARA(QGPL/JBA001DT) TYPE(*CHAR) LEN(6) + VA LUE('010196') TEXT('The last day that had job acct. 82. 83. SFLDROP: To drop the second line of multiple line subfile. we can find existence of object on the system. 86. How many primary fil es allowed in a program? Only one primary file is allowed in program. 87. Define an Interac tive Job? * A user requests a job. without waiting f or the next input or output/input operation. next we can dynamically create the data area. What is the func tion of DSPATR (display attributes) keyword? Use this field level keyword in dis play file to specify one or more display attributes for the field you are defini ng. * The sub system QINTER takes the job from the job queue and starts processing. * Job is created and job name. What is the difference between externally described file and program describ ed file? The field definitions and descriptions are defined out side of the prog ram in a externally described file. delete the object s on the system. job attributes are assigned. If the data ar ea object found.

What is the maximum number of parameters allowed in CLP? 43 ( Forty three) 95. Where can you specify an indic ator in LOKUP operation? In 'EQ' position.For All Fields Display Attribute Meaning BL HI RI CS ND PC UL Blinking field Hig h Intensity Reverse Image Column separator Non Display Position cursor Underline For Input-Capable Fields Only PR Protect contents of field from input keying MDT Set modified data tag when displayed OID Operator identification SP Select by l ight pen 89. What is the purpose of OVRDTA (Override Data) keyword? Use this field level keyword with PUTOVR keyword to override the existing the data contents of a field already on the display. 90. What is the maximum number of parameters allowed in RPG? 255 (Two hundred a nd fifty five) 94. What is the maximum number of files allowed in R PG? 50 (Fifty including eight printer file) 97. What is maximum number of Arrays allowed in RPG? 250 (Two hundred and Fifty ) 98. 100. 91. What is the maximu m number of fields under a record format of physical file? 8000 (eight thousand) 93. What is the maximum number of re cord formats in DSPF? 1024 (One thousand and twenty four) 92. What is a Physical file? . What is a Member? It is a subset of data records of a physical file. What is the maximum number of subroutines allowed in RPG? 254 ( Two hundred and fifty four) 96. What is the purpose of PUTOVR (Put with explicit override) keyword? Use this record-level keyword to permit the override of either display file att ributes or data contents of specific fields within a record displayed on the wor k station device. 99.

O are to defined at key field level. What is J oin Logical file? Join logical file joins more than one file. What is default data type (if you define decimals '0') in Physical file? Pack ed decimal 111. This is also called as regular logical file. JREF.Physical file nothing but a table contains a only one record format in which we can describe the field definitions and descriptions. What is a Keyed physical fil e? Defining a field as a key in physical file. What is the difference between Packed decimal and Zoned decimal? Packed dec imal : One digit occupies 1 byte. They are File level. What is a composite key? Defining more than one key as a key field in physical file. 114. How man y levels are there in a Physical file? Four levels. JOIN. What is the necessary keywo rd for Non-join logical file? PFILE (which is record level keyword) 106. 103. What is arrival sequence? . But we have to give record length. With the help of CRTPF we can ac hieve this. What is default data type for the fields(sub fields) defined in data structures in RPG? Zoned decimal 112. What are the necessary key words for the Join Logical file? JDFTVAL. 109. JFLD. What is the use of UNIQUE keyword and what level it is defined? It will avoid to enter duplicate key values. Hence we can access records throu gh the key field. At what level S. Record level. 105. Field level. 108. Zoned decimal : One digit occupies 2 bytes. 107. 102. The purpose Select/Omit logic is depends on the criteria (condition) given at the key field level (At function en try) it selects and omits the records. Key field level. The S/O is allowed in Logical file only. What is a Logical file ? It is nothing but a logical view provided by the physical file.O are defined and what they wi ll do? S. 116. The maximum of num ber of files allowed to join is 32 (thirty two). What is a Non-join logical file? It only provides logical view based on the physical fil e. What is the use of JDFTVAL in join lo gical file? If you specify JDFTVAL at file level. the join takes place. Is it possi ble to create a physical file without DDS? Yes. JFILE. We have t o define it in a file level. even the primary file record d oes not match with secondary file record. 104. 115. 101. 11 0. 113.

When do you use F-spec. What is the native language of AS/400? RPG/400 120.It can not be referred by any other job . tape files etc. * Local Data Area . It can be created. What is the maximum number of key fields allowed defining in a physical f ile? 120 118. . How do you know that records are locked? By u sing a command WRKOBJLCK. you need to be open and close files explicitly in a RPG program. pip (program initialization parameter data area) data area. 121.It can be created by user implicitely or explicitly It can be refe rred by any other jobs. . local data area. we can use indicators in RPG. * In order to define a named dat a structure as a file information data structure. 127. It can be associated with a library. 126. * In order to rename the record format of a database file in a program.The records will be accessed the way in which records are added to physical file . deleted by the user. How many specifications a re there in RPG/400? What are they? There are seven specifications are exits in RPG/400. discket files. we can access the dat a area record in to the program. What is the purpose of Indicators in RPG? In orde r to control the logic flow. grou p data area. printer files. How do you read data area in an RPG program? With the help of 'IN' opcode. They are listed below: * * * * * * * Header Specification File Descript ion specification Extension specification Line counter specification Input speci fication Calculation specification Output specification 122. What is acronym of RPG? Report Program Generator 119. 123. 128. What are the different types of Data Areas ? The different types of Data Areas are general data area. *Genera l Data Area . 125. continuation line ? * In order to refer the named r ecord format as a subfile record format in the program. * Supports externally described files. Why RPG/400 is famous? * Easy to code an d analyze. What are the various type s of device files? Display files. 117. When do you explicitly open files and close files in an RPG program? If y ou specify the letter ' U ' at column 73-74. 124.

*Pip Data Area . QRPG 139. QTEMP. QSY S. QCBL. What is ter m CUA . SAA? Common User Access System Application Architecture 132. What is an Object? An object is any thing that exists in and occupies space in storag e and on which operation can be performed. 142. 137. 0) 134. 129. What is Spool file. 138. Why is AS/4 00 called Object Oriented Machine? Everything on the AS/400 System that can be s tored and retrieved is contained in the object. 133. What is a Library in AS/400? A library in AS/400 is an object that serve(acts) as a repo sitory for other objects. What are various t echniques to pass parameters from one program to another? PLIST. 135. What is Folder? A Folder is a named obj ect that is used as a directory for documents and other folders. What is DDM ? Distributio n Data Management is a function of the OS/400 that allows an application program or user on one system to use database files stored on remote system.It is automatically created and deleted by the system We can access the group data area value through clp. It is not associated with any library. How are the objects stored on AS /400? All objects are stored on AS/400 in a single level storage. *Group Data Area . Name few IBM supplied libraries? QGPL.It is automatically created and deleted by the system. In this method all objects are referenced by one virtual address which is translated in to a p hysical address whether it is an auxiliary storage or main memory. 140. 136. Folders can be filed with in another folder. TFRCTL 13 0. It is meant for grou p jobs. What is the version of OS/4 00 that we have? V4R2 (Version 4. 0 Release 2. What is library list ? A list that indicates librar ies used for the process and the order in which it has to be searched System ide ntifies it in *LIBL. How many libraries can be there in library list ? Tota l 40 (15 system and 25 application) 141. CALL. Which single RPG opcode performs both SETLL and READE? CHAIN 131. Why is it required? . QUSRTOOL.It is meant for pre start jobs.

Group Job is usef ul in enhancing the programmers productivity. What is Job description? A Job description defines an environ ment in which a batch job or an interactive job to be executed. message queues. What is an ICF file? A device file that allo ws a program on the system to communicate with program in other system. What is a job log? A record of request submitted to sy stem be a job. 151.A file that holds output data to be processed. What is Sub-System? Su b-Systems are specific user defined partitions of the CPU where various jobs may be executed. Disk. 150. What are the two main attributes. For example all RPG/400 messages are stored in a file. which govern the execution of a job? Run time priority and Time slice 148. such as information waiting to be printed. It is as though logging into the s ame user-id many times. Device file can be Printer. 154. Batch Job : A predefined group of processi ng actions submitted to the system to be performed. The attributes are: Job Number Unique system generated se quential number Job Name Any user defined name (Max 10 char) User Name Who initi ated the job. Wh at is a Device file? A device file contains the description of how data is to be presented to a program from a device or vice versa. What is Job. The system program maintains it. The group jobs can have different library lists and different output. 144. 147. Tape and Remote system. 143. and action performed by the system on the log. Wha t is a message file? It is a file which contains the messages of an application. 152. There should be an initial gr oup job and it can be branched to many other group jobs. 149. The message related to the requests. What is Group Job? A Gr oup Job is attached to one workstation and a user. What is the difference between Interactive & Batch Job? Interactive Job: A Job started for a person who signon to a workstation. How to create file s dynamically without DDS? Through OPNQRYF . 145. 146. What is the purpose of OPNQRYF (Open Query File)? OPNQRYF is used to select certain records of the data base file based on the QRYSLT (Query select ) condition. One subsystem can have more than one active job at a time. all COBOL/400 messages a re stored in a file. What are the attributes of a Job? A Job is a basic u nit of work on AS/400. 153.

168. Group Data Area (GDA). What is an authorization list? . What are the valid user defined data area types? CHAR. and subsystem monitor jobs. What are the different ways to input data into da ta area? CHGDTAARA (using CL) Using OUT opcode in RPG 163. Numeric. 15 7. Using IN opcode in RPG 164. thus preventing other users from processing at the same time. length of a LDA? *CHAR. How to create a user defined (general) data area ? Using CRTDTAARA command 162. 161. What command must be executed before executing OPNQRYF command? OVRDBF (Ove rride Data base file) 156. A data area can be locked to a single user. 159. Da ta Queues are used in Program to program communication. includin g auto-start jobs. What is the u se of Data Queues? Data queue is a type of system object that you can create. What are the valid data types in Data Queu e? Char. What is Data Area? Data area is an object used to hol d data for access by any job running on the system. Program Initialization Parameter (PIP) Data Area. What is the type. Local Data Area (LD A). What are the types of data areas? User defined Data Area. How to retrieve data from data area? Using RTVDTAARA command in CL. and Logical 169. NUMERIC and LOGICAL 165. Only one GDA can exists for group. What is GD A? The system creates a GDA when an interactive job becomes group jobs. and read without lock. How c an a data area be locked after being updated? Using OUT *LOCK 166.155. How to create a dat a queues? Using CRTDTAQ command. 1024 bytes 160. 158 . How do you use DEBUG uti lity? STRDBG program-name UPDPROD(*YES) 171. 167. 170. What is LDA? LDA is created by the system for each job in the system. What are the two types of read performed on d ata queues? Read with lock. jobs started on the system by a reader.

*READ. What is the use of OVRDBF ? You can use the Override with Database file (OVRDBF) command to replace the database file na med in a CL program or to change certain parameters of the existing database fil e. The sy stem identifies it an object type *AUTL 172. 183. How do you grant authority? Using G RTOBJAUT command 173. *ALL. *EXCLUDE. What is the use purpose of CRTCMD? To create user defined command. These record images are used to recover the changes in the file should the system ends abnormally. 179. permanently? Using CHGPF command 178. How do you put jobs in batch mode? SBMJOB 175. What is class of service ? A set of link and node characteristics associated with a ses sion. record wait time etc.A lists of two or more user Ids & their authorities for system resources. * ADD. What is the function of RJE Con version Utility? It converts compressed data written to an AS/400 database file to decompressed data written to another AS/400 database. How to see active jobs of the system. or device fil e. What are the functions of Remote Job Entry (RJE) ? Allows user of AS/400 system to submi t jobs and receive jobs from a host system. What are the types of object authorities? *USE. *OBJEXIST. *CHANGE. Ho w do you detect unused spool storage? Using Reclaim Spool Storage. Commitment co ntrol is a function that allows you to define and process a number of changes to database files as a single unit (transaction). 180. What is the use of OVRPRTF ? Override with Printer file (OVRPRTF) comman d is used to override certain parameters of the printer files used in the progra m or to replace the printer file. Using WRKACTJOB command 181. file wait time. 186. What is the purpose of STRC MTCTL command? Starts commitment control for files that are being journalled. 182. 184. 177. *OBJMGT. What is journaling & Commitment Control? Journaling is a function wh ich records the changes in a file in a journal. *OBJOPR 174. . . diskette. What process the command SBMRJEJOB does? Sends RJE input stream to host system 185. *DLT. How to change file attributes such as siz e. *UPD. 176.

Field level 200. 195. 202. Keyed sequence access path. What are all the different types of acces s path? Arrival sequence access path. Join lev el. to select/omit records. Keyfield level. Record format level. What is the Select and Omit criteria in logical file? T his is used to specify rules for the Selection/Omission of records from a Physic al File. 191. What is Multi-format logical file? Logical which uses fields from two or m ore physical files. The Data Tag detect whether th e field has been changed as a result of user input. What would be the effect on the field whe re reverse image. and the record format can be different for different physical files. When would the ALL keyword be used? Use with Select or Omit. What are the different definition levels in Data Description Specifications? File level. 194. What is an access path? The order in which the database fields are organiz ed for processing in the program. .187. by using C ONCAT keyword 197. jou rnal and PFs to be journalled. Record level. What is the maximum nu mber of records you can specify in a display file? 1024 201. What the difference between Source P hysical File and Physical File? A Source Physical File contains the source for t he various objects created this file has specific structure. What are the different types of keywords in display files? File level. 192. What is t he default value for the number of increment for the physical file? Three 193. 196. Field level. How can a screen fi eld that has changed since the last output operation be detected ? Attach the MD T (modified data tag) attribute to the field. Select/Omit level. 199. What is the use of DSPATR(MDT) key word? Sets on the modified Data Tag of the field. 203. Can fields be concatenated INa logical file level? Yes. 188. 189. 190. W hen does the DFT keyword in PF be used? To specify the default value it a field. to detect whether field has been c hanged as a result of user input. What are the system objects required for journalling? Journal receiver. underline and highlight display attributes were active? The re sult is same as if you had specified ND. A Physical File con tains data.

. 208. ASSUME: It is used to specify that the OS/400 program is to assume that this record is already sho wn on the display when this file is opened. Subfile Contr ol Record Format. What is the purpose of the INDARA keyword? This File-level keyword is used to remove option and response indicators from the buffer and places them in 99-byte separate ind icator area. 209. 213. What keyword must be used with PROT ECT keyword? OVERLAY 214. 2 07. SFLSIZ : it is an attribute which specifies the number of records can be stored in subfile. 211. What is the purpose of FRCDTA keyword ? Immediately display a record format with out waiting for the next I/O operation. Associated Subf ile Keywords. 217. RANGE or VALUES keyword be overridden? Yes. What is SFLPA G and SFLSIZ ? SFLPAG : it is an attribute which specifies the number of records that can be displayed in a screen. Can error messages as a result of a CO MP. What are all the contents of subfile? Subfile Record Format. Relative Record Number. 206. What are the two record formats a subfile contain ? Subfile r ecord forma (SFL). OVRATA keyword (field or record level) can be used to overrid e the existing display attributes of a field or record already on the display. 212. 210.204. and subfile control record forma (SFLCTL). Explain the purpose of KEEP and ASSUME keywords? KEEP: Keep th e display from being deleted when the display file is closed. 215. What is the maximum number of subfiles that can be specified in a display file. OVRATA keywords? OVRDTA keyword (field or record leve l) can be used to override the existing data contents of a field or record alrea dy on the display. 205. through CHKMSGID keyword. In conjunction with what other ke yword must OVRDTA and OVRATA be used? PUTOVR keyword must used. What is Subfile? Subfile is group of records of same r ecord format and can be read from or write to the display in a single operation. Subfile Record Number. How can a message from a message file appear as a constant on the screen? By using MSGCON (message constant) keyword. Explain the use of DFTWRT displ ay keyword? No records will be displayed until there is any I/O operation. W hat the purpose of OVRDTA. 216. 218. which keyword would h ave priority? CSRLOC gains priority. If DSPATR(PC) and CSRLOC were specified for a format.

Maximum number of subfiles that can Defined in a RPG program for one di splay file is 24 220. by using SFLLIN keyword. Break message. Explain the difference betwee n defining Subfile and Message-subfile? Subfile record is defined by SFL keyword . the two character strings are concatenate d. 222. 226. 224. CHAR. 225. LGL 229. TCAT. which specifies t he number of records to scroll at a time. User message 232. How to trap errors in CL? By using Monitor Message Command (MONMSG) 233. BCAT Truncates all trailing blanks in the first character string. What is difference between CAT. How do you pass par ameters in CL? Using PARM keyword. How to pick up the changed records every time in a subfile after the first change made? Seton SFLNXTCHG keyword indicato r and update the subfile record. Program message. one blank is insert ed. How will you display a particular page in subfile? Move a valid relative record number (RRN) in the field specifi ed using SFLRCDNBR keyword in DDS.512 219. What are the diffe rent types of variables available in CL? DEC. 230. What is the maximum length of a variable n ame in CL? . then the two character strings are concatenated. What is the use of SFLEND keyword? By spec ifying this keyword. TCAT Truncates all trailing blanks in the first character string.line display of a particula r record in a subfile? Using SFLDROP keyword. How do you specify the number of records to roll in a subfile? Use SFLROLVAL keyword in DDS along with number. 231. What are the different types of messages in CL? Immediate message. How to toggle between single line and Multi . 227. where as Message subfile is defined by SFLMSG keyword. Maximum number of subfiles that can be active for a single file is? 12 221. 223. BC AT? CAT Concatenate two variables or constants into one continuous string. Can more than one subfile record be displayed on one line? Yes . 228. the Bottom/More message could be displayed at end of screen .

245. What is the use of Header Specification in RPG/400? It identifies by H in column 6. How many printer files can be defined in F specs ? 8 243. Use Program described files. In which specification the report layout can be defined? O Specificatio n. arrays and tables. 241. What is the use of E specification in R PG? Extension Specs describes all record address files. When will DUMP and DEBUG opc odes be ignored? If blank is specified in position 15 of H specs. What is a Prima ry File? It is used in RPG Program Cycle to automatically read records in a cycl e.Maximum 11 characters (including '&') 234. Use the concept of su bfile (to display more than one record). Use subroutines. provides inf ormaion about generating and running programs. 238. 239. What is the use of L specs in RPG? Line counter specification can be used to des cribe printer file to indicate the length of the form and number of lines per pa ge. 244. 236. 237. You can not declare more than one object (file) in a CL programme. How do you specify page overflow indicator for printer files in RPG? Specify an indicator in position 33-34 of F specification. Can a indexed file be accessed in arrival sequence in RPG program? Yes. 235. to describe the files. What are Control level indicators? L1 to L9 used to identify certain fields on control fi elds and then used to condition which operations are to be processed at detail o r total calculation or output time. 246. but a single output message subfile is a special type of subfile that is supported well in CL. Use Printer or ICF files. . 240. Specify d ifferent indicators used in RPG? Overflow indicators Record Identifying Indicato rs Field Indicators Resulting Indicators Control Level Indicators 237. Give three main purposes of File specificati on ? To define files. to assign the files to specified de vices. How many files can be defined in F specs? 50 242. What are the limitations of CL (compa re to RPG) ? you can not use CL program to ADD or UPDATE records in database fil es.

260. 251. 248. What is match field indicator? Matching record indicator is seton when all the matching fields in the record of a secondary file matches with all the matching fields of a rec ord in a primary file. 253. 258. 249. What opco de could be used to test an alphanumeric field for all numeric values? TESTN 254 . What is SCAN and XLATE? SCAN operation scans a character string (base string) contained in factor 2 for a substring (compare string ) contained in factor 1. What opcode will be used to test the zone of a character field? TESTZ 255. XLATE operation translates characters in source string (factor 2 ) to the from and to strings (factor 1 ) and put into the result field. Wh at does the opcode FREE do? The FREE operation removes a program from the list o f activated programs. 261. 256.247. When is a TAG statement used in RPG? It is used as Label. How to read database records without locking them? Put 'N' in position 53 of C spec s. How do you use exceptional write in C specs? Using EXCPT opcode. It does not close file o r unlock data area. What is the length of a variable in RPG? 6 Character s. frees static storage and ensures program initialization (f irst cycle processing) the next time program is called. 257. 250. What does CHECK opcode is used? The check operation verifies that each c haracter in the base string (factor 2) is among the character indicated in the c omparator string (factor 1). 259. 252. What is a Program Described file in RPG? The field name and length of the f ields are defined with in the RPG program. Can you specify a display file to be used in the following modes Input. . or Combined modes ? Yes. What does 'SR' in columns 7-8 of C specs mean? Calculation operation is a part of RPG subroutine. What is externally described fil e ? All information about the fields is specified in DDS and the RPG program can use them with in the program. How do you use commitment control in RPG pro gram ? Using COMIT operation. Output. Makes all changes to the files that have been spec ified in output operation since the previous COMIT or the begining of operations under commitment control(if there has been no previous COMIT or ROLBK operation ).

the record being processed when the exception/error occ urred or the record that caused the exception/error. and places the sum in the result field. 267. /SPACE. What does opcode POST do? Puts information in INFDS.262. What is the maximum number of times Multiple Occurrences DS can occur in a program? 9999 272. writing output (WRIT E) . The RPG routine in w hich the exception/error occurred. 271. ? 255 269. 266. *ROUTINE : contains name of routine in which the exception/error occurred *PARMS : contains the number para meters passed to this program from the calling program. DS is defined as program status DS by an S in position 1 8 of the DS statement. Use OPEN and CLOSE opcodes in RPG program to open and close files. /COPY 273. The status code. How can the user implicitly open and close the files in RPG program ? Enter UC in position 71-72 of F specs. 1. Wh at is SAA? Systems Application Architecture (SAA) is a collection of selected so ftware interfaces. A file information data structure c ontains predefined subfields that identify: the name of the file for which the e xception/error occurred. processing calculations (PROCESS) 3. How can we sort an array? By u sing SORTA opcode. 265. What is File Information Data Structure? File Inform ation Data structure (INFDS) can be defined for each file to make file exception /error information available to the program. AS/400 and PS/2. conventions. *STATUS contains status code. an RPG/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps. What are all the compiler directive statements? /TITLE. What is XFOOT opcode? Adds all the elements in a numeric ar ray. 270. and protocols that will provide a consistent fra mework across the System/370. 268 How many parameters can be defined i n a RPG program. The last operation being pr ocessed when the exception/error occurred. During execution. What is Program Status Data Structure? A Program status DS can defined to make program exception/error information avail able to an RPG program. r eading input (READ) 2. Can we define Multi-dimensional arr ays in RPG? No. 263. /EJECT. 274. What is the maxim um number of elements in an array? 9999 264.

287. 281. PFILE. DSPF.Data Description Specification. What does the keyword UNIQUE mean ? Records with duplicate key values are not allowed. RPG. What is FCFO.****************************************************************************** 2 75. 28 3. What is the use of SDA ? S creen Design Aid is used to create display files interactively. QS YS. How many record formats can you have in a Physical file and in a Logical file ? Physical file can contain only one record format. Logical file can contain more than one record format. What is the difference between Physical and Logical files ? Physical f ile contains data. What is keyword PFILE specifies ? PFILE is used define the Physical file being referenced. System i dentifies it in *LIBL. What is a l ibrary in AS/400 ? Library in AS/400 is an object that serves as a repository fo r other objects. This fi le has a specific structure. How many libraries can be there in a library list ? Total 40 (15 system and 25 application). changing & creating source files. 286. 276. A-spec UNIQUE. S ource Physical File contains the source for the various objects created. QTEMP. 280. CLP. FIFO. Can it be used for Update ? . PRTF. 288. 284. What is Multi-format logical file ? Logical which uses fiel ds from two or more physical files. RE FFLD 282. What is the function of SEU ? A utili ty for editing programming language source code. What is a Join Logical File. deleting. 279. 278. QRPG & QCBL. LIFO in Database environment ? These are file level keywords which are used to access the records in the order FCFO : First C hanged First Out FIFO : First In First Out LIFO : Last In Fist Out 285. What is a library list ? Library list that indicates libra ries used for the process and the order in which it has to be searched. etc. QUSRTOOL. Name few IBM supplied libraries ? GPL. 277. scanni ng. where as Logical file serves as a access path to database. What is the Function of PDM? Productivity tool for copying. DDS .

296. 294. What ar e the different Opcodes available in RPG for Database access ? READ. 290. What is the purpose of OVRDTA and OVRATA keywords ? OV RDTA keyword (field or record level) can be used to override the existing data c ontents of a field or record already on the display. 300. Is it necessary to define all formats ? Whi ch are mandatory and which are Optional ? No. 308. 295. un derline and highlight display attributes are active ? The result is same as if y ou had specified ND. Update is not possible t hrough JLF.Spec . 304. DELET. UPDAT.Logical file that combines more than one physical file. WRIT E. '>'. 289.( F ) Extension Spec. .( I ) Calculati on Spec. What keyword must be used with PROTECT key word ? OVERLAY 299. In which specification Data Structures can be defined? I . Can an indexed file be accessed in arrival seQuence in RPG pro gram ? Yes.( L ) Input Spec. What would be the effect on the field where reverse image. *DATE. 293. UN LCK. FORCE. 305. 291. In which specification can a report layout be defin ed ? O Specification. Is it possible to join the same file to itself ? Yes.( C ) Output Spec. 307. What is the symbol used for shifting fields in SDA? '<' . What is the symbol used to g et name & length of a field in SDA? '?' . SETGT. CLOSE. When is a TAG statement used in RPG ? It is used as a Label. 298. What does SDA stands for ? Screen Design Aid. READE. to detect whether field has been changed as a result o f user input.( H ) File Sp ec. Moving : '-' & '='. What is RPG ? Report Program Generator. How can a screen fi eld that has changed since the last output operation be detected ? Attach the MD T attribute to the field. all are Optional. What is the use of E specification in RPG ? Extension Specs describes all record address fi les. 306. 292. 303. OVRATA keyword (field or re cord level) can be used to override the existing display attributes of a field o r record already on the display. What is the symbol used for defin ing a new field in SDA? '+'. What is the symbol used for copying & moving new field in SDA? Copying : '-' & '=='. OPEN. arrays and tables. How many files can be defined in F specs ? A maximum of 50 files. REDPE. 302. 297. READP.( O ) 301. CHAIN. SETLL.( E ) Line counter Spec. NEXT. *TIME. What are the di fferent types of specification available in RPG/400 ? Control Spec.

327. 319. What is the difference between * LIKE and *NAMVAR ? *LIKE defines the variables as in database. What does CHECK opcode do ? The check operation verifies that each character in the base string (factor 2) is among the ` character indicated in th e comparator string(factor 1). 318. Filler line & Sample line. Can you have multiple key lists f or a single file ? Yes. and WHxx. 312. 317. Execution time array. 328.309. 313. 311. What are the different opcodes used for file operation on a subfile in a RPG p gm? READ. CHAIN.UPDAT and WRITE 323. Can we define Multi-dimensional arrays in RPG ? No. 325. In conjunction with which statements can ORx x and ANDxx conditions be used ? DOUxx. What does op code POST do ? Puts information in INFDS. READC. What is SFLPAG and SF LSIZ ? SFLPAG : it is an attribute which specifies the number of records that ca n be displayed in a screen. What are the different types of arrays available in RPG ? Pre-execution time array. *NAMVAR is used t o define variables as data area. 320. Can a single screen format occupy a screen area above and below a subfile format ? Not possible. 329. SFLSIZ : it is an attribute which specifies the numb er of records can be stored in the subfile. DOWxx. How can database records be read without lock ? Put 'N' in position 53 of C specs. The maximum number of subfiles that can be active for a single file is ____ . 316. Where will control be passed after the exe cution of the *PSSR subroutine if the factor2 of the ENDSR is blank ? Control wi ll return to the next sequential instruction. 314. How to pick up the changed reco rds every time in a subfile after the first change made ? Seton SFLNXTCHG keywor d indicator and update the subfile record. Compile time array. 24 321. 12 322 . How will you display a particular pa ge in subfile ? Move a valid relative record number(RRN) in the field specified using SFLRCDNBR keyword in DDS. 310. 326. What is XFOOT opcode ? Adds all the elements in a numeric array. 324. What is the function of RLU ? . which specifies the number of records to scroll at a time. What is the maximum number of subfiles that can specified in a display file ? 512 The maximum number of subfi les that can defined in a RPG program for one display file is ___ . How do you specify the number of records to roll in a subfile ? Use SFLROLVAL keyword in DDS along with the numb er. During input operation which indicator position is seton if there is a re cord lock? LO indicator position is seton. What are the three line types in RLU ? Report line. and places the sum in the result field . IFxx. 315.

SFLPAG are the m andatory key words 336. What are different record spacing keywords in RLU ? SKIPA.Create Sample Data. Mandatory keywords of sub file SFL. A service program differs fr om a program in two ways: It does not contain a program entry procedure. Command associated with OPNQRYF is CPYFRMQRYF to save the output permanently It is a CL command to monitor and error/exception message so that in case of an error a dump is avoided and the control is in program. NP . What are the different commands used in RLU ? DR . When ever a record is changed on display file.Define Constants. In many respects it is sim ilar to a subroutine library and procedure library.Change Line for Continuation. CF . 3 35. What is LOKUP opcode? Lookâ s for a particular element of an array 344.Centre Fields & SP . DC . How can u check no of records in a file DSPFD 3 39. It is also us ed to monitor . How do handle file exception/error *INFDS . If an indicator is a ssociated with SLFNXTCHG and it is SETON then READC will read only the changed r ecord. Difference between SFLRCDNBR and SFLNXTCHG SFLRCDNBR wil l give the RRN of the First record displayed on the screen at a given time. Is module ex ecutable No You need to create an RPG prog to run the module 341.Change Line for Record.e. How can see logical file based on which physical file and vice versa DSPDBR 338. if the expression is A = B + C then B and C are f rom the file while A is defined in OPNQRYF. printer files you can describe in a RPG 50 files and 8 printers 345. C LR . 332. Wha t is OPNQRYF. What are the three types of keywords associ ated with printer file ? File level.View Fields. And if the indicator is not associated and it is seton it READC reads all the records from sub-file 337. 331. This me ans that you cannot call a service program using the CALL operation. What is the command used to invoke RLU ? STRRLU. SD . We can divert the output of command to an OUTFILE. 19. SFLDSP.Spac e Fields evenly.New Page. and it can have resultant fields i. 333. 334. CLC . VF . 330. A service p rogram is bound into a program or other service programs using binding by refere nce 343.*PSSR defining it in F spec 346. SKIPB.Define Record. MONMSG commands It is Dynamically creation of access path. How many files.To design & prototype a report. What is proced ure? A procedure is the set of self-contained high level language statements tha t can perform a particular task and then returns to a caller 342. SFLSIZ. How do u compile RPGLE program Either thru 15 or crtrpgmod 340. DF . What is servic e program? A Service Program is a collection of runnable procedures and availabl e data items easily accessible by other ILE programs. SFLCTL.Define Fields. An MDT is set ON. How do you combine two record formats in RLU ? Using CLC. SPACEA & SPACEB. Record level & Field level.

How will you search an array? LOKUP 354. What are DDS required for SUBFI LE? SUBFILE DISPLAY (SFLDSP) SUBFILE DISPLAY CONTROL (SFLDSPCTL) SUBFILE CLEAR ( SFLCLR) SUBFILE SIZE (SFLSIZE) SUBFILE PAGE (SFLPAGE). 368. How to fire a JOB? SBMJOB . What are the uses of FACTOR1. How will you add a field to physical file already containing data? With CPYF command and *NOCHK & *DROP 351. 355. 353.user message. How many levels of security are there on AS/400? There are 10 to 50 level of security on AS/400. What are the different types of arrays? Preruntime gets populated at the time input. 366. How will you find a string using PDM? By using FNDSTRPDM. What does DEFN do? It is used to define a field based on the value specified i n FACTOR 1. 348. 356 . How you get the relative record in a subfile in which cursor is locat ed? By using the keyword SFLCUSRRN (Subfile cursor relative record number). 365. 350. Can you display a empty subfile? Yes by using the keyword SFLINZ and SFLRNA. Runtime gets populated at the time execution. 352. 347. 349. What is message file? It is file which contain messages create d by the user through which a user can display own message while validating. How do you set pointers to values 55 or next higher or greate r? SETGT. The records have read even it has not been changed due to SFLNXTCHG. 367. Distinguish between terminat ing a program through SETON LR and RETURN? LR closes all the files used in the p rogram and RETURN is used to return the control to the parent program. How you will find an error which is not in the first page of the subfile without using ROLLDOWN key? By using keyword SFLRCDNBR. How to translate field values form lower case to Up per case? By using opcode . What is ELASTIC and NON ELASTIC SUBRILE? When subfile size is greater then subfile page size it is c alled elastic subfile and when subfile size is equal to subfile page size it is called non-elastic subfile. What are two types of record are used in subfile? SUBFILE RECOR D FORMAT and SUBFILE CONTROL RECORD FORMAT. What is SFL ROLVAL? By using this keyword you can tell system to roll on of records when the user presses ROLLDOWN key (For this you define a hidden of 4 byte). 361.Compile time gets populated at the time of compilation. FACTOR2 and RESULT field for the RPG operation code PARM? It is add value of FACTOR1 to FACTOR2 or compar e the value of FACTOR 2 with FACTOR1. 360. What is QCMDEXC? It is used to execute a single CL command within the RPG progr am. 362. Why do we use READC? What is SFLNXTCH G? READC is to read those records which have changed in the subfile. 358. What is maximum size of data area? 9999. How do you read changed records backward in subfile? NOT POSSIBLE. 357. It initialized all the character field as blanks and numeric f ields as zeros. The first which have changed and made valid and released still displaying in reverse image. 359. 363. How yo u will know whether you are in SFLDROP or SFLFOLD mode? Bu using the keyword SFL MODE. What is SFLINZ and SFLRNA? SFLINZ stands for su bfile initialize. If you vali date a record in subfile on some condition all the invalid records can display i n reverse image. 364. 369. SFLRNA stands for subfile record not active (It means records ar e there in the subfile but active). 371. 372. How will I explicitly open a file in an RPG program? By defining UC in file condition and to opening the file mention OPEN opcode and closing the file by mentioning CLOSE in opcode of C spec. 370.

382. 385. 387. How do you shutdown your IBM server? PWRDWNSYS. Write system defined f unction used to place system name on the screen? *SYSNAME 404. 376. 390. 389. SFLPAG. 393. 3 95. 392. Addin g new record. 391. How to check end of file in CL? Monito r the message ID (CPF0864). You have given a job for printing and you are no t getting the printout what might be the reason? Some more pending jobs might be there in Job Queue. What is a subfile? Subfile is a group of records which can be used for (Displaying. 406. How do you write and read a value (similarly as EXFMT of RPG) using a display file in CL? SNDRCVF. How to see the CPU usage? WRKACTJOB or WRKS YSSTS 399. How do you display a screen in CL? SNDF. Which function key should be pressed to watch all strings defined on the SDA screen? F20 401. While designing t he screen. 397. Difference between WRKUSRJOB and WR KACTJOB? All the jobs in WRKUSRJOB are seen including Active jobs where as in WR KACTJOB only active jobs are seen. SFLDSPCTL. then which function key should be pressed? F14. Can you a dd a record to a physical file through CL? NO 386. and Deleting the existing records). Can you update a file in CL? NO. which function key should be pressed to get the field from the field referenc e file? F10 402. There are multiple jobs for printing in job queue and you want to print a important document then what will you do? Change the priorit y or change the job queue name. Write down any two mandatory keywords use d when defining a subfile? SFLDSP. F3 function key is kept common for all record formats. How do you monitor message in CL? By using monitor message ID: (MONM SG MSGID (CPF0000) 388. What is maximum size of a subfile? 9999. 384. What is the full for of CA and CF? Command Attention and Command Function. 398. Why do we d efine MOVE *ON *INLR? It frees the memory. 379. Modifying the existing record. which option do you select? 17 403. 373. SFLSIZ. How many maximum arrays can be used in a single RPG program? 200. 394. What is the maximum length of an OCCUR? 9999. While designing the screen using SD A. What are the maximum parameters can be passed from one RPG program t o another RPG program? 255 374. On which level should it be defined? File Level 405. . How many maximum printer files can be used in a single RPG program? 8 378. 381. 380. Except report design what else can be done by O spec? We can write a Physical File from O spec. What are the three levels of SDA? File l evel. What opcode is used for submi t job? Why it is used? SBMJOB opcode is used and it is used for background proce ssing. How many maximum parameters can be passed from o n RPG program to another CL program? 40 375. Field level. Which Function key should be pressed to define hidden field while you are working with SDA? F4 400. Record level.XLATE. What is *PSSR? It is a system subroutine w hich is executed by default when any error occurs in a program. SFLCTL. 396. 383. While designing the screen user wants to add file level keywords. If your workstation does not show login screen what might be the problem? Pr oblem with some subsystem. How many maximum loops can be used in a sing le RPG program? 100 377. All the fields and parameters in the memory will become blank. From work with member using PDM screen you have to modify exist ing member using SDA.

415. 420. Whatâ s the use of STRPDM? To work with Libraries . SEU shows prompt /syntax checking according to MEMBER TYPE. 437. 414. 432. User (*te st) & Product (*prod). What is the format of As/400 Commands? Verb Object Qualifier Verb: . which contain data. RLU: If user wa nts to define new numeric field on record format then which line command will be used? VF.9999 format? EDTWR D (â .action Object: . Objects. 427. 429. its also possible t o create level break reports. Maximum report length is 132. 412. What i s Qualified & Unqualified path? Qualified path means mentioning object name alon g with library name while Unqualified path means directly writing the object nam e. is called as external described file. file s or other As/400 objects. What is the dif ference between normal UPDDTA to PF and updating using DFU program? Both are sam e only difference is DFU allows you to add or change selected fields.407. How can you specify no duplicate k ey? By defining the unique key. 422. TRUE. If user wants to add one field on the report then which function key should be pressed? F11. 430. If user wants to change the length of the nume ric field defined in report then which combination of keys will be used? F23 & F 10. What is Library List? A jobâ s library list defines the path of libraries that the job follows when trying to locate programs. 421. What is the comman d to know key fields of file? DSPFD (F4) *ACCPTH(Access . What is the command to know how many LF are related to a PF? DSPDBR (Display Database Relationship) 438. Members & User Options. Difference between Source Physical File & Physic al File? Source Physical File contains members who contain source statements & P hysical File contains members. 413. 410. 436. 435. . 434. 433.identifies yo ur job 431. â ) 418. What is externally described file? A file. While designing the report using RL U. which is created external ly & described in the program. 425. SDA: After getting field reference from referen ce file selected files will appear at the bottom of the screen and then which co mmand function will be used to get it on screen with its label to be left aligne d? &3L 411. How many types of files are available on As/400? There are 2 types of files on As/400 th ey are Databases files & Device files. 419. 409. Type of Source File & Physical File? Source File: *PF/SRC Physical File: *PF/DTA 428. What is Library? A library is a system object that serves as a directory to other obj ects or collection of object 424. Types of Libraries on As /400? There are 3 types of libraries on As/400 they are System (*sys). What is Logical File? A Logical file is an Access path to the Physical File. RLU: Which field level keyword sh ould be used to change any numeric field of length 8 to 99. If user wants to center the company name on his report then which li ne command will be used? CF. Using DFU. To change constant field defined on RLU screen whic h field level keyword should be used? DFT 417. Which path a good programmer should use? Unqualified path. SPACE and SKIP are FIELD & RECORD LEVEL keywords. 426.on which action is performed Qualifier: .99. What is difference between SKIPB (2) & SPACEB (2). Using Query. In which Specs can PF be made internally ? In I Specs. 416. user will be able to _______ ____ from Physical File? Add/Update/Selected or all fields. user wants to add record level keyword then which function key should be pres sed? F18. if user is designing a report usin g RLU? FALSE (378 Max). SFLRCDNBR is a FIELD LEVEL keyword 408. 423.

control is transferred to label designated in the r esult field. Printer file & Display file? *File 442. of lines moving to the next page while Space be fore leaves the specified no. What does the OVRDBF command do? It overrides the PF temporarily for a job.Path). The label specified must appear as the Factor1 of a TAG operation s omewhere in the program. What is Subrou LT. What are the basic features of SEU? Prompt depending upon type. 443. 460. What are indicators? Indicators are in built class of variables for RPG. File Access Opcodes? READ. Difference between GOTO & EXSR? EXSR is a cond itional branching while a GOTO is an unconditional branching. PRTF & DSPF.E (Externally Described) 457. Tables & Constants are defined? In I Specs. 468. L. I. 466. 450. 454. PF. *ON & *ALL. What does EXFMT does? Write & Read. 465. 453. READE. 44 9. It is available for read a Can a Join Logical File be updated? No. Which are the member types which SEU supports? RPG. How many Specs are there in RPG & Which are they? There are 7 Specs in RPG th ey are H. *ZEROS. 464. Specs what is the opcode for write? EXCPT. *LOVAL. Difference between skip before & space before? Skip before leaves the specified no. 441. 456. *HIVAL. E. LF. *BLANKS. F. Which is the Primary Editor of As/400? Source Entry Utility (SEU ). Information & Lis t Display. LE & EQ. 458. When you are defining a flat file in your program in F Sp ecs which format will you specify? Flat File: . 439. KLIST. Types of Ta bles in RPG? There are 2 types of tables in RPG they are: Compile Time Tables Pr e-Runtime Tables 469. it is a system-defined subroutine it is executed automatically. What is CAB? It compares Factor1 with Fac tor2 & if condition is true. Menu. 455. 470. What is a Join Logical File? A join Logical File can be built over t he two PFâ s. 451. 452. with the PFâ s â joinedâ by a common key value. of lines on that page. What does LOKUP does in Tables & Arrays? The LOKUP opcode searches the Factor1 entry in table or array. *OFF.It does not retains the value into the buffer memory. GE. 444. What is the use of *PSSR in the program? Whenever there is any type error in the program the control straight away passes onto this subroutine. How many printer files maximum can be used in single RPG program? 8 because of the overflow indic ators OA-OG & OV. How does the RUNQRY show the output? RUNQRY shows the output always in RRN (Relative Record Number) & not in keyed sequence. Which are the figurative constants used in RPG? * ZERO. In â Oâ tine in RPG? A subroutine is a group of statements in a program that can be proc essed several times in that program. 448. What is the syntax for PLIST? *ENTRY PLIST PARM 461. CF: It retains the value into the buffer memory. What is the object type of PF. Do we have to Execute the *INZSR compu lsory? No. . CL. Which indicator is use d for Read? EQ (Equal to) 459. READP. What are the different methods to access SEU? Use the Start Source Entry Utility command (STRSEU) Opti on 8 from STRPGMMNU Through Program Development Manager (PDM) 446. SE TLL. In which Sp ecs Arrays. SETGT. READPE CHAIN. Which are the Relational Operators in RPG? GT.*BLANK. 445. 463. Difference be tween CA & CF? CA: . 447. How many types of display are available on As/400 for user interaction? 4 Types they are Entry. 467. LF. C & O. What is a Spool Fil e? Printed output items placed in an output queue are known as spooled files. 462.F (Fixed Length) Other File: . shows ri ght hand side date & left hand side the line number.

EXCPT & WRITE. e. 494. Date Area Data S tructure. 492. Join Logical Files h ave always one record format. 493. Difference between Interactive & Ba tch Job? Batch job begins. How can we run a Batch Job? SBMJOB Command. File Information Data Structure. 473. 481. What is the c ommand to shutdown the As/400 Server? PWRDWNSYS & Parameter *IMMED. Message Queue. User De fined Data Structure. Multiple Occurrence Data Structure. d. Which are the libraries (system) always pr esent in the library list? QTEMP & QGPL 486. How can we know the CPU utilization of the server? WRKACTJOB (Work with active job) WRK SYSSTS (Work with system status) 485. Types of Data Structures? a. Types of Object Locks & what they do? There a re mainly 3 types of locks they are as follow: .*EXCL : Only the routing step h olding the lock can use the object *EXCLRD : Routing step can read/update the fi le other jobs can only read. Menu &Program. What is Subfile? A Subfile is a temporary area in memory which re cords may written to & read from a display file device. Data Queue. 490. How is data stored in PFâ s? In fixed length records. Maximum number of Records in Display File? 1024 476. 475. Which users are allowed to manipula te system libraries? QSECOFR & QSYSOPR 487. What is RPG Fixed Logic Cycle? A logic the compiler su pplies is called RPG Fixed Logic Cycle. What is the error if we donâ t get login screen? There is some problem with su bsystem. Can the objects stored in the produc t library be modified? No. What is DBMS? A DBMS is a software system that controls the cr eation. How to run other job when one job is active? Change the priority o r rename the job. 478. Difference between CALL & SBMJOB? CALL pe rforms interactively job while SBMJOB performs batch job. What is a Join Logical File? A Join Logical File combines informat ion from two or more physical files into one record format. organization & modification of a database & access to the date stored wi thin it. Give an example of DEFN opcode? *LIKE DEFN ENAME $ENAME (Now the $ENAME has all the attributes same like ENAME) 491.KFLD. 484. What does VLDCMDKEY means? Valid Command Key . File. 482. 480. 488. b. *SHRUPD : All jobs can read/update the object. What is a trigger? A trigger is an action that automatically occurs whenever . 472. Use of Data Structures? â ¢ Dividing a field into sub fields. How do you place or remove locks on the objects? *AACOBJ & *DLCOBJ 495. â ¢ Grouping non-contiguous data in a contiguous format. How many types of objects are there on As/400? 8 0 489. What is the opcode to release all th e locks on a particular PF? UNLCK 497. 479. runs & continues to execute instructions without huma n intervention or control while Interactive job are user driven. â ¢ Cha nging the format of a field. 477. 496. â ¢ De fining an area of storage in more than 1 format. Library. Some of the object types on which locks can be allocated? Data Area. c. Program Status Data Structure. 474. 471. Which is the subsys tem that is always on till the main power switch is off? QCTL 483.

It provides the interface between output queueâ s Spooled files & the printer. 507. 514. F is the type of file desg. What is an Output Queue? They ar e the holding areas that store printed output generated from Batch programs or I nteractive applications. If the data is likely to change over a period of time & M oreover data is large than which type of table is preferred? Compile Time Table. the data elements must be of s ame Length and same type. Can a Subroutine contain another Subroutine? No. it is placed into an? OUTQUEUE 525. 506. 517. How many triggers can be associated wi th a single PF? 6 (max) 499. When a spooled file is created. What is the command to view the library list? DSPLIBL 519. While designing the screen user wants to add file level keyw ords then which . Used for externally descri bed files given when file types are? I & U 502. What is an Array? Array is a collection of data. Library on the bottom o f the library list & Current library? Current library 530. The command to display a list of spooled files? WRKSPLF 526. Library QGPL. 504. 516. What does print writer do? It is a system job that selects files from the output queue & prints Them on a printer. 509. The function key to start SEU session through program development manager i s? F6 522. To sto re information in multiple columns.a change Is made to a physical file. The LF is associated with how many PFâ s? At least one PF at a time. Which one of the following has the highest pr iority Library on top of the library list. The members in LF contain? Acc ess Path. it uses the concept of Alternate Table. 505. 513. How can we add & remove trigger to a PF? ADDPFTRG & RMVPFTRG 501. 521. What is the command to create PF? CRTPF 520. 508. A PF can have how many record formats? Only one 529. 512. The Qualified name for an object ORDPF residing i n a library TRAINING is? TRAINING/ORDPF 515. Does the SETLL & SE TGT retrieve the record? No. What is Alternate Table? RPG tables stores information in 1 column. 531. data elements Must be of same type and same length. they simply position to the record. Command to display current library is? DSPCURLIB 528. What is a table? A table is collection of data elements in one column. 503. Change in the externall y described file does not require recompilation of the program? (True/False) Fal se 527. 498. What are the 2 t ypes of lines on O Specs? Record Identification Line & Field Identification Line . 510. The Member type for an RPG & CL program which SEU supports is? RPG & CLP 523. The members in a Source Physical Fi le contain? Source statements for a program. Consider the followin g command: WRKOBJ OBJ (*ALLUSR/DBTMEF) Object DBTMEF in all libraries except sys tem libraries. What is a Compile Time Table? We can hard code data within the program is said to be Compile Time Table. Give the Table definition? TABMT 1 12 2 A Where 1 = Number of entries per record 12 = Total number of entries 2 = Length of each entry A = Ascending Sequene 511. 524. What is a Ru n Time Table? Data from a separate disk file is loaded into a table each time th e Program runs. The members in a PF contain data? (True/False) True 518. Printed output items placed in an output queue are known as? Spool File s. How can we know the triggers associated with the PF ? DSPFD with parameter TYPE (*TRG) 500.

What if RPG. While designing the report using RLU user want s to add record level keywords which function key is pressed? F18 533. 540. Wha t are members? Members are separate entities within a database file & they are c omponents of As/400 object. Using DFU user can do which operation? Add. when & who invented it? Report Pro gram Generator is IBM introduced a High Level Language in 1960. 549. What are the different File Designation Types in RPG? P (Prima ry) & F (Fully Procedural) 563. 560. date separator.function key is pressed? F14 532. While designing the screen using SDA. U (Update) & C (Combine). Whatâ s the use of File Designation in RPG? It refers to the way program will . SFLSIZ. If user w ants to add one field on the report then which function key is pressed? F11 534. SFLDSP. 544.) 561. Write system defi ned function used to place system name on the screen? *SYSNAME 545. which function key should be pressed to get the field from the FRF? F10. SEU shows prompt/syntax checking according to? M ember Type 536. RL U: If user wants to define new numeric field on record format then which line co mmand will be used? VF 550. SFLCTL & SFLPAG 547. 543. For. How does Union file maintains Record formats? 1 Record format for each PF 556. Space & Skip are which level keywords? Field & Record 553. What is the difference between SKIPB ( 2) & SPACEB (2)? SKIPB (2) skips 1 page & on the next page after skipping 2 line s space print next while SPACEB (2) skips 2 lines space before printing. O (Output). If user wants to center the company name on his report then which command will be used? CF (Center Field) 535. 559. While design ing screen F3 function key is kept common for all record formats on which level should it be defined? File level 546. Which are the different File Types in RPG? I (Input). 558. What is full form for DDS? Data Description Specification 557. which purpose is H Specs used? Writing header information. currency sy mbol etc. 562. Which function key should be pressed to define hidden field while you are working with SDA? F4 541. If user wants to cha nge the length of the numeric field defined in the report then which combination of the keys will be used? F23 & F10 548. Which function key should be pressed to watch all string defined on SDA screen? F20 54 2. if user is designing a report using RLU? FALSE (Maximum is 378) 551. To change constant field defined on RLU screen which field level keyword should be used? DFT (Default) 552. only difference is DFU pro gram allows you to add & update selected fields. From WRKMBRPDM screen you have to modify existing member-using SDA which option do you select? 17. A Multiple format Logical File is also known as? U nion File 555. Using Query it is possible to create level break report? YES 538. A Join Logical File has ho w many Record formats? 1 554. What is the difference betw een UPDDTA to PF & updating using DFU? Both are same. Update & Select fields 539. Write down mandatory keywords used when de fining a subfile? SFL. What is the size of the filename in RPG? 8 Characters (Max. Maximum report length is 132. It is possible to run Query using RUNQRY command? YES 537.

divide fields into sub fields & to form a group of fields. Command to create FRF? CRTPF 580. A program variable coded in an Embedded SQL statement is referred to as? Host Variable 597. 596. What is a Journal? A Journal is an object used primarily to record chan ges to data in a PF. What are the different File Form at Types in RPG? F (Fixed Length) & E (Externally Described) 565. 578. Which are the DB2 tools to protect Integrity of the da tabase? Journaling & Commitment Control. Referential Integrity Embedded SQL & Ob ject/Record Locks. *PARM. What is SQL? SQL is a n interface for programming language. An access p ath may be in which sequence? It can be in Arrival & Keyed sequence 575. When are the Referential Constraints executed? Insert. Whi ch CL command can be used at program execution to redirect the file named in an RPG program? OVRDBF . Join Logical File displays dat a from how many files? 2 or more PFâ s 581. Which of the CL command can be used to deter mine which logical files are dependent on a specific file? DSPDBR 598. Update Delete & File E nquiry. 588. 587. SCAN. fetch records. What does DFU program you to do on a record? Insert. How many triggers can be associated with a file? 6(Maximum) 589. A Query can be run in which mode? Batch & Interactive 585.access or retrieve the data from the file. 564. Which are the four keywords sup ported by Program Status Data Structure? *STATUS. 590. 576. When are the Unique Constraints executed? During Insert. the function key to be pressed is? F9 584. 568. 595. CHECK. 567. 571. How many maximum spaces could be given in O Specs? 3 569. which can be given in a Que ry? LIST 583. fetch values from records into variables. DLCOBJ command is mandatory for removing lock on any object? Fa lse 594. 566. A Query can be displayed without saving i t? True 582. What do we can do with the Embedded SQL statements? We can Insert/Updat e/Delete records. 591. What is I Specs for? T o describe the records within Program described file. To add a file to the â File Selectionâ option of a Query. A file cannot have more than 1 unique key? False 593. Why is the Declare curs or statement is used for? To define & name the cursor & specify rows to be fetch ed. Which type of object is used in DB2/400? *FILE 577. Which are the Query selection criteria. Update & Delete. File level entry for a PF can be? UNI QUE & FIFO 579. fields. Which CL command is used to trap error messages during program execution? MONMSG 599. What is the us e of File Format in RPG? It tells to the program that the records are within the program (F) or outside the program (E). 574. Which are Control Break Logic indicators? L1 â L9 . Records can be Read/Update/Deleted with which file? Simple Logical File & Physical File . 570. What is L Specs for? To tell lengt h of page & number of lines to be printed on a page. CHECKR. constants. Which are the String Manipulation Opcodes? TESTN. What are Data Structures? Data Structures define an area of storage & lay out of fields within the defined structure. DB2 is a type of Database? It is an Integrated RDBMS. 586. SUBST & CAT 573. *ROUTINE & *PROGRAM 572 . What is the values SQLCOD when there is an error in fetching the records specifi ed in the select statement? -ve value 592.

Submitting a job using numeric parameters. the program is not found. Command OVRDBF st ands for? Override (replace) the file named in the program & Override certain pa rameters of a file that are used by the program. the length of th e parameter should be? 15. What will happen. Which wi ll be the output of the following ILE Code?D Answer S TC Tâ 12:00PMâ ADDDUR 12: *Hours An swer 00. What is command to convert the date format in CL? CVTDAT 604. OVRPRTF FILE (Output) SPLFNAME (Reports)OVRPRTF FILE (Output) COPIES (3)CALL PGM (Rpg001) Copies = 3 610. 618. What ILE RPG/400 code procedures the same results as the RPG/400 code shown belo w?C A Add B Sum1 Sum1 Mult X Rslt Rslt Div Tot Answ C Eval Answ = (A+B)*X/Tot 62 3.5 601. What will be the attributes of the output repor t. What is command to write or update to a database file in CL? No command 605. the RPGLE code look like this: D $Aprid S Like ( Crprid) 627. Given the following code segment. Can you debug RPG III prog ram with STRDBG? YES & Vice versa NO 617. What is th e command for retrieving user profile attributes? RTVUSRPRF 606. What is the length of the variable in the given example? DCL VAR (&Name) TY PE (*Char)? Default 32 & for Decimal 15. 614. Is not used in ILE? E Specs. The keyword used to define number of entries per record for Tables/ Arrays in RPGLE is? PerRcd (n) 628. Which of the following methods will make e xternally describe file fields available to a program? A Data Structure definiti on specification that names the file on the EXTNAME keyword.5 609. What is the com mand to display the Data Area â Nameâ ? DSPDTAARA â Nameâ 607. In the followi ng code %SUBST is aEval Result = %SUBST (Flda: Str: Len) Built in function 622. 615. A CL program. If we want to define a new variable $Aprid with same attributes as field Crpid.600. Which of the following options describ es the result of using the USROPN keyword? This file must be opened with an expl icit OPEN operation prior to accessing this file. Which of the following CL command us used to display a screen & wait for the user to press enter or a function ke y? SNDRCVF 602. 621.D PGMNAME S 20A Inz (â THX1138â )C CALL PGMNAME C PARM P1 5 The CALL to the program name stored in the PGMNAME field ends in an error. What will be the output of the following ILE code?D Loandate S D DATFMT (*USA) Inz (Dâ 12 31 92â )UBDUR -30: *D Loandate 629. Which of the following Specs. Command in CL to copy a Query to a database file? CPYFRMQRYF 613. What is the type of the A rray in the following code?D Arr S 30A Dim (30) PerRcd (1) CTADTA Compile Time A rray 619. In order to test changes in EMP001 a test file called TESTEMP is library TESTLIB needs to be used EMP002 should process EMPMAST as it normally would. Command to retrieve attributes of a job? RTVJOBA 61 1. if we use STRISDB command for RPGLE program? Err or: Program type not valid 626.00 AM 630. What is the command to su tch Job? SBMJOB 608. . Only 1 file can be declared in CL program? True 612. EMPCL1 calls the RPG program EMP001 & the calls th e RPG program EMP002. Command CLOF stands for? Closes the da tabase file.RPg program EMP001 & EMP002 were both written to process th e file. Ad d the following CL statement directly before the call to EMP002 DLTOVR FILE (EMP MAST) 603. Command OPNQRYF stands for? Opens a database file to a set of database records that satisfies a database Query request. 616. The DATFMT keyword allows you to specify which of the following date format? *USA 624. What is the command invoked when we give option 14 to RPGLE program? C RTBNDRPG 625. 620.

643. No of elements = 5. Extended Factor 2 Length of Factor 1 & 2 is i ncreased to 14 as well as Length of OP-CODE is 10 Free format is allowed Built-i n-functions are available. SETLL. State whether the following code is correct?@Arr is an array. & Length of each element = 3A. If user wants to retrieve the time in microseconds. SFL and SFLCTL ? There are the two manda tory key words for subfile program /design. Advantages of ILE or RPG? 1) In RPG it is one step compilation (we will get *PGM object) while in ILE-RPG it is two step compilation (we have to create a *MODULE and then bind that module to a program. MOVEA & SORTA does? XFOOT: . X False 636. recursive call is not supported. What does XFOOT. Which is the Built in function to convert numeric field to Alpha field? %ED ITC. What is SFLC SRRRN and SFLRCDNBR ? SFLCSRRRN will give the RRN of the record where the cursor is positioned. While SFL is used to define Subfile record format while SFLCTL is used to define Subfile Control Record format. While in ILE RPG it is supported. READP. then 10 records fro m file are written to subfile. What is sub-file? It is group of records read from or writt en to display file in a column format. %CHAR 632. RPGLE supports which calls? Static & Bound 635.In which all the records from the P hysical file or at max. Subprocedures can use RPG cycle? False 634. In ILE EPM (Extended Program Model) is implemented while in RPG OPM (original program model) 640. SFLPAG should be less than SFLSIZ Sin gle Page/non-elastic â In this case sub file size (SFLSIZ) must be equal to sub file page (SFLPAG). what is SFLDROP and SFLFOLD These are the two key-words used in sub-file for di splaying additional information which cannot fit one line. SFLSIZ = 10 and SFLPAG=9. READE.Sorts the array in ascending or der but if while declaring the array Sequence is defined as D it arranges in des cending order. MOVEA: . For CHAIN. For example. It is always a subset of records from phy sical file hence the name subfile.e. 642. 641. READPE & READE where indicators are given & their success? Opcode Success Indicator CHAIN OFF HI READ. For example.Sums the elements of an array SORTA: . SFLRCDNBR will give the RRN of the First record displayed on the screen at a given . 9999 records are written to subfile.(this is applicable to L oad all type also). How many files can be opened in RPG IV program? No Limit 637. In case of ILE we have the concept of ACTIVATION GROU P. SETGT. In this case PA GEUP AND PAGEDOWN is taken care by system. READPE OFF EQ SETLL ON EQ SETGT ON HI 638. READE.631. if SFLSIZ = 10 and SFLPAG = 10. %EDITW. what Would be data type of the field? Z 633. And this two are the different parts of sub-file.C Movel â ABCâ @Arr. then 10 records from written the sub file from physical file but only 9 are displayed on screen. In this case PAG Expandable/elastic/growing â In this case SFLSIZ should be grater at least by 1 than SFLPAG. What are the Sub file Types? There are three types of sub file Load All . In RPG we cannot call a program i. Here sub file size should 9999 or the number of records form PF which ever is less.Transfers valued from Factor2 to the Result field of the Operation but one of them must be an array 639. SFLFOLD will give vie w in folded form and SFLDROP will give view in truncated form. 644.

SFLE ND are the optional key words used in subfile. Frees the space and release ODP. 655. 648. In CL/CLLE we can not insert a rec ord into database file. SFLPAG are the mandatory key words. 659. what should happen? It should process al l the valid options before invalid options encounter. How do I insert a record into a database file? I n RPG / RPGLE with the help of WRITE op-code. 649. Once invalid options is en countered program should stop processing and display error message at the bottom of the scrreen. SFLCTL. The whole construct is defined as subroutine. 650. 652 . 653. SFLINZ. Yes. How will you achieve POSITION TO in Load all subfile? Whil e loading subfile move RRN. 657. Reading record s from a subfile using READC With the help of READC op-code we can read only cha nged records from subfile. Position to particula r record? With help of op-code SETLL from RPG/RPGLE.PGUP . RETURN â It dose not close files and dose not release the ODP and passes the control to the calling program / command prompt if the program is called from command prompt. Required key words for subfile. 658. How to define a s ubroutine ? with help of two op-code BEGSR(Begin subroutine) ENDSR (End subrouti ne) and between these two op-codes write the instruction. SFLSIZ.time. 645. When a key v alue is entered into POSITION TO field. How will you take c are of multiple options in case sub-file? We will have to handle it within the p rogram using a READC in a loop. It wi ll retain all the options entered in the previous page. 647. if we type options an d then PGDN. SFLDSPCTL. If an indicator is associated with SLFNXTCHG and it is SETON then READC will read only the changed record. An M DT is set ON. 654. LR indicator and RETURN operation? LR indicator â It close all the open f iles. SFLCLR. PLIST and KLIST PLIST is a l ist of parameter and KLIST is the list of KEY fields. 656. What is the operation / op-code to change in file? In RPG/RPGLE with the help of UPDAT / UPDATE op-code. SFL. Different operations on indic ator? There are only two operations on indicator those are SETON and SETOFF. Next READ will read that particular re cord. In case of Load all sub-file. If we type some options on screen out of wh ich some are invalid and pressed enter. it will position the record pointer just before the required record. will options be there on the display / in subfile. Two way of deleting records from file? one is DELET E and other with the help of O-Specs ADD/DEL specify DEL. What is SFLNXTCHG? Whenever a record is changed on display file. SFL DSP. And if the indicator is not associated and it is seton it READC reads all the records from sub-file 646. having a LOOKUP into a array we can get a corresponding . KEYVALUE in to a two dimensional array. 651.

668. %LEN â Returns the length of value from a field.Gives the size of the variable or liteeral %PARM â Gives the number of parameter passed to parameter %PADDR . How D ARR2 S D ARR1 S D ARR1 S to define array in D spec.15 Zoned dec *STATUS Status code. Assigning RRN value to SFLRCDNBR and then displaying the sub-file. What is INFDS? IN FDS is a File Information Data Structure.Trims the right & left blanks of the string %TRIMR . %CHAR â Converts a Numeric filed to charact er. 666. 660. record already locked.Change the index of a table or multiple-occurrence data structure.Replaces the specifi ed number of characters from the specified position.29 Character *ROUTINE Fi rst 8 characters of the procedure 30 . Wha t are the built in function in RPGLE ? %SIZE .9 Character Open indication (1 = open). What is *PSSR and INFSR? It is an exception/error handling routine which is specified in F-Sepcs for a file.RRN. 10 .gives a sub string from a variable (%SUBST(X:Y:Z) %ELEM . 1 .10 Character End of file (1 = end of file) 11 . %EOF â End of File. INFSR is an information subrouti ne to specify the routine name in F-specs. 1 0 DIM(5) It is a Run time array 40 DIM(7) FROMFILE(File name) PER RCD(1) It is Pre Run time array 663.21 Ch aracter *OPCODE Operation code The first five posi 22 . 16 . INFSR(*PSSR). 5 DIM(5) CTDATA PERRCD(1) It is a Compile time array.Gives address of the variable %TRIM . 661.Gives t he address of the procedure %ADDR .Trims the right blanks of the str ing %TRIML . How to write *PS SR ? . If *STATUS = 01218 i.Gives number of elements or occurrences %INDEX . 662. %SUBST .37 Character RPG IV source listing line n umber 667. Can we call *PSSR if no exception occurs? What happen it is cal led ? Yes.Trims the Left blanks of the string %REPLACE . How to go to *PSSR ? Whenever an exception/error occurs and *PSSR is declared in F-specs. it is automatically go es to *PSSR 665.e. How to print HEADER if O-specs are used in program ? With the help of op-code EXCEPT. How to determine if the record is in used by another user ? We can de termine weather a record is in use bye another user with the help of status code (*STATUS). %FOUND â If record is Found. Whether the statements specified are executed. 664.8 Character *FILE The first 8 char acters of the file 9 .

What is the disadvantage of usi ng Global variable? We can not trace out at which point the value of variable is changed. 674. Procedure Prototype In this section we specify the name of the procedure along with PR. . What is Service Program? A Service Program is a collection of run nable procedures and available data items easily accessible by other ILE program s. 670. D PROC1 PR Procedure Interface It is secti on where we define all the parameter which are receiving or returning some value s. This means that you cannot call a service program using th e CALL operation. In many respects it is similar to a subroutine library and procedure library.It just similar to any other subroutine. *PSSR BEGSR ⠦⠦⠦⠦⠦⠦ ⠦⠦⠦⠦⠦⠦ â gh level language statements that can perform a particular task and then returns to a caller. the procedure should end with C PROC1 E In returnable p rocedure. 673. How to define a procedure ? First we have define Procedure Pr ototype along with all parameter. And PR. D PROC1 PI 5 0 D PARMA 5 0 D PARMB 5 0 672. A service program differs from a program in two ways: It does not contain a pro gram entry procedure. it should end with C RETURN PARMA + PARMB 671. How to define Global Parameter in ILE ? Declare a variable with key word EXPORT and while using this variable in anther program declare with IMPORT keyword. What is Procedure Proto type and Procedure Interface. D PROC1 PR Then define Procedure with Begin/End Procedure Name Begin/End P PROC1 B Export Then define Procedure Interf ace along with parameter and PI D PROC1 PI 5 0 D PARMA 5 0 D PARMB 5 0 Define al l the parameters as a variable to the procedure D PARMA S 5 0 D PARMB S 5 0 In n ot returnable procedure.

The option filed is displayed in re verse image. Command Attention key and Command Function K ey ? With the help of Command attention key we can pass only the indicator statu s to program not the data from screen. as in case of *ISO format it required fields of 4. 683. What key w ord is used when screen is re-display? RSTDSP is a parameter to be specified at compile time for display file. How to define to define a Hidden filed in DSP F ? Define a filed in a DSPF of use HIDDEN.2. How to avoid using indicators in ILE ? By using the standard Built In Expressions like %FOUND. And a Program Queue. Disadvantage of using Validity Check keyword? How to overcome these di sadvantages ? If invalid values are entered. And EDTCDE has some Codes pre-defined for example. What is *ISO date format? YYYY-MM-DD for other formats refer to IBM manual or ERIS document. 685. What are the important factors in Error message subfile ? We must define error message record format (SFLMSG). EDTCDE cannot be applied to C haracter filed. 686. 680. 675. EDTCDE(Z) â for s uppressing the leading zero Y â for date field. COMP 684. EDTCDE & EDTWRD EDTCDE & EDTWRD are key words used for formatting purpose. 678. OVERLAY It allows a record format to be disp layed on screen retaining the previous displayed record formats.%EOF . NOT %EOF. While command function key passes indicat or status as well as a data from screen to program. How To get the cursor positi on? With the help of RTNCSRLOC keyword. RANGE. Keyboard is locked. 677. 682.(H) 687. To overcome above disadvantage validat ions is done within program and user friendly/defined message is displayed. here we need to define a field to get ro w and . System defined message is displayed which may not be user friendly. we have to reset it. what will happen ? Program crashes . (PGMQ) and Record format is associated to a line number.A service program is bound into a program or other service programs using bindin g by reference. NOT %BOFâ ¦etc. Display / Printer File 679. If we tried to move yea r part of *ISO date into a field of length 3.2. What is the structure of Service Program ? What is signatur e ? ????????????????????????????? 676. 681. How to validate input v alues in Display file ? with the help of Validity check key words VALUE. %BOF. EDTWRD can be used to define user de fined formatting for a fields.

*RESTRICT â Del eting a record in a parent file is permitted if data for a non-null parent key d oes not match data for a foreign key. Using Single state ment. SELECT * FROM FILE1. OUT . Deleting a record in a parent file is restricted (does not occu r) if data for a non-null parent key matches data for a foreign key. MYLIB/PROC1 this PROC1 is a progra m written and compiled separately and it is of language which you are specifying in section LANGUAGE. Language can be RPGLE. Procedures in SQL provide th e same benefits as procedures in a hot language. A stored procedure is a program that can be called to perform operations that can includ e both host language statements and SQL statements.A check constraint is being added Type of Delete rule (DLTRULE) *NOACTION â 1. END-SQL We can have parameters as IN . Deleting a record in parent file is per mitted (not restricted) if data for a non-null parent key does not match data fo r a foreign key. That is.FLD1 EQ (SELECT FILE2.A primary key constraint is being added . . SQL / 400 â Structured Query Language 688. 689. Type of *REFCST *UNQCST *PRIKEY *CHKCST cons traints . What is the stored procedure and how do you define a stored procedure. FILE2 WHERE FILE1. How do you achieve referential integrity? By adding Referential Integri ty Constraints to a Physical file or Logical file. C. a common piece of code need only be written and maintained once and can be called from several program s.. IN OUT type. Deleting a record in a parent file is rest ricted if data for a non-null parent key matches data for a foreign key.A referential constraint is being added .FLD1 Using Nested Sele ct statement SELECT * FROM FILE1 WHERE FILE1.0 fixed We can specify *FILED for filed * REC for Record on which a key is pressed.FLD1 = FILE2. Length of variable should be 5. Writing an SQL statement from selecting records from TWO files using single statement and Nested select statement.A unique constraint is being added. ETC. CL.column. etc. FOREGIN KEY. UPDATE RULE. Stored procedures can be used in both distributed and non-distributed applica itons.FLD1 FROM FIL E2) 690. DELETE RULE. . Constraints like PRIMARY KEY. syntax is as belowâ ¦ EXEC SQL DELCARE P1 PROCEDURE (:PARM1 INOUT CHAR(10)) (EXTERNAL NAME MYLIB/PROC1 LANGUAG E RPGLE SIMPLE CALL WITH NULLS). It is defined using DECLARE PROCEDURE statement. Commands are ADDPFCST for Physical file and ADDLFCST for Logical file.

View is similar to Logical file without hav ing Key and Index is similar to Logical File having Key (as keyed logical file h as access path data) Table is similar to PF. PREV. When the FETCH is issued .. the cursor is positioned to the row of the table that is specified by the POSITION option. How to call / invoke the stored procedure ? Using CALL command .FLD1 FROM FILE2) 694. Can we have records (with fiel ds from more than one file) from multiple files and Nested / sub query in SQL ? Yes. To use serial cursor we have to re-issue OPEN Scrollable Cursor which is def ined with SCROLL key word. (FIRST. Type of Update rule (UPDRULE) *NOACTI ON â No Action *RESTRICT â Updating a record in a parent file is permitted if data for a non-null parent key does not match data for a foreign key. It only shows a data from table while Index has a Indexing Data for a sequence on which Index is created. LAST. . Where Stored procedure lies in the system. Difference between View and Index ? View will not any data.FLD1 IN (SELEC T FILE2. Differe nt type of Cursor? Two types of Cursor Simple / Serial Cursor A serial cursor is one defined without SCROLL key word For serial cursor each row is fetched only once per OPEN When it is opened it is positioned before the first row in the tab le. 691. Updating a record in a parent file is restricted if data for a non-null parent key matches data for a foreign key. we can have record from multiple file with join condition and we also can h ave nested query or subquery like SELECT * FROM FILE1 WHERE FILE1. RE LATIVE) 696. Deleting a record in a parent file cause s matching records in the dependent file to be deleted when data for a non-null parent key matches data for a foreign key. Select * fr om ????????????????????? 692. NEXT. Cursor defined with SCROLL key word Rows of cursor ca n be fetched many times When it is opened it is positioned before the first row in the table. What is the sequence when using CURSOR? Define Cur sor Declare Cursor Open Cursor Fetch record Processing Close Cursor 695. 693. we can have a look through SQL.*CASCADE â The cascade delete rule is used. If we want to hav e a look where the stored procedure.

from which we would retrieve or save the required object. 706. AS/400 triggers are file level triggers. Print queue where the printer files (report) reside and wait for thei r turn to get printed. 708. Miscellaneous 701. 707. What is difference between Inte ractive and Batch Job ? job where user interaction is present is called an inter active job. What is Library? L ibrary is an AS/400 object of type *LIB. What is Data area and how it is used in RPG program ? Data area is a type of an object which is used for storing data. What is Trigger? Trigger are the programs which are activate d upon certain event. Does Opening of cursor locks records ? Yes. And If creation is outside the called program then we will be available with only one set of output. What is library list ? list that indicate libraries used for the process an d the order in which it has to be searched. A job where user interaction is not required is called a batch job. What will happen if we call s tored procedure again and again ? It the creation of procedure is included in th e called program. It can contain all types of objects exc ept another object of type *LIB 702. Records selected into cursor are locked when the cursor is opened. then we can have different set of output depending upon the pa rameter passed to it. ????????????????? ??/ needs to elaborated moreâ ¦. 703 . Can we update database file with the help SQL Cursor ? Whi le declaring the cursor if we specify FOR READ then we cannot update but if we s pecify FOR UPDATE or nothing (by default is FOR UPDATE) then we can update datab ase file. What is Sub-system in as/400? It is Run-time environment. 699.????????????????? 705. What are the two important parameter while creating a SQLRPGLE program ? 1) CMTCTL . What is JOBQ and PRINTQ ? Jobs go into the job queue in order to run in a subsystem.697. which provides all t he resources required for the execution of program along with necessary memory s pace required. 700. For example to find an object system will search in the in the ascending order of libraries mention in library list. What is Library List? It is sequence of obj ects of type *LIB. How to handle run time error in CL Program ? By usin g command MONMSG with suitable message identifier 709. Which program RPG or CL is efficent to update a tra nsaction onto a database . 704. 710. The data is read by "IN" and w ritten by "OUT" opcode.*NONE (Commitment Control) CLOSQLCR . It is defined using opcode *NAMVAR.*ENDMOD (End of Module) by defau lt is *ENDACTGRP 698.

An ob ject is stored and retrieved via a device-independent addressing mechanism. What does STRSRVJOB c ommand used for ? It is used to debug the batch programs or debug the interactiv e program of another job. 723. 712. 711. What is OVRDBF and where it is used ? OVRDBF is a command to temprorarly over ride the paramete rs of a Data base have signed on AS400 and then typed Call XYZ and pgm XYZ is an RPG program which simply reads a database file and generates report. Committment control ensures that a transaction is updated successfully onto the data base (all rele vant files). What is the difference between OPNQRYF & Logical file ? OPNQRYF is temporary Lo gical file. 722. OPNQRYF is used for dynamic selection. 713. What is difference between Physical file and Logi cal File ? Physical file contain data where as logical file serve as access path . It is used in association with OPNQRYF. to use different file with same record format in a program. Which is the better option to write a transaction (o rder header and detail transaction) using two physical files or one join logical file(on those two physical files) in a program and why ? Using two physical fil es is the better option because records can't be written through join logical fi le. 720. How QTEMP is different from other libraries ? It is a ssociated to each job (Other Jobs can't access the other's QTEMP). How many record formats can you have in a Physical & Logical file? Physic al file can contain only one record format where as Logical file can have more t han one record format. 716. What is difference between Multi record format Join and Non. It is not a job. What is difference between Journaling and commitment control ? Journa ling record all transactions and is used for restoring or reverting back the tra nsactions onto the database file for a particular time span. QTEMP is crea ted when the Job is started and deleted when Job is closed. situation where frequency to run the programs is less & very large number of records are present in data base file.J oin logical file ? . What i s single level storage ? Main storage and disk stroage appears contiguous. 717. Can we have a multi record format join and non join logical file based on one physical file ? We can only have Join logical file based on one physical file. 718. 714. 715. c hoice is RPG program.file and why ? CL program cannot update/write onto a data base file and hence. 721. Why can't a database file be used in place of data area ? Using data base file will reduce the performance of application. What kind of job is it --. 719.

724. What is difference between ILE RPG and RPG/400 ? Difference is in program development (s pecification). program running (activation group. What is the d ifference between triggers and referential integrity ? Triggers are programs (wh ich carry out a particular business function) invoked either before or after man ipulation of the records in a database. Pre-Run time and Run time. 728. *NA MVAR is used to define variable as Data area. don't specify "K" in F specification in the progr am for this file. What is the difference between *LIKE and *NAMVAR opcode? *LIKE defines program variable same as that of another pre defined variable. What is the difference betwee n SKIPA & SPACEA ? In a printer file the printing control goes to the line (of t he page) mention in SKIPB where as it leaves number of lines mention in SPACEB 7 35. Run time array gets value during the program execution. 730 . 729. subroutine *PSSR 736. Can a file be used under commitment contr ol without being jorunaled ? No 727. Can a file be journaled without using it under commitment control ? Yes 726. Referential integrity maintain the integ rity of a database using key fields.Multi record format logical file contain more than one record format( based on o ne or more physical file) With join logical file only read operation can be done whereas in non-join logical file all operations can be done. What is a data structure ? What are its uses ? A data structure is a variable field which is partitioned by defining variable fields (call as Sub fields). Pre-run time array gets value from a file at the beginning of a program execution (before any statement of a p rogram is executed). resource sharing). 733. What are different ty pes of Arrays and what is the difference between them ? There are 3 types of arr ays Compile time. bind module to create program). How to handle run time error in RPG Program ? by using indicator on statemen t. 732. 734. Compile time array gets value at th e time of compilation of the source of a program. How will you display a particular page (or record) in a Sub file? Move a valid relative record number(RRN) in the field specified using SFLRCDNBR keyword in DDS . What is difference between module and progr am ? Module is a non-runnable object where as program is runnable. combining various key fields to make one key field and so on. month and year. 725. 731. Var ious uses are converting character value into numeric. splitting date field into day. program creation (create module. Can an indexed file (File with key fields) be accessed in arrival seq uence in an RPG program ? Yes. What is Multi occurence data structure ? It is an array of a Data struc ture.

What is SFLNXTCHG keyword used for ? To read the change records for 2nd. 3rd. The SETLL operation does not apply the lock. . What is difference b etween keyword SFLCSRRRN & RTNCSRLOC ? RTNCSRLOC returns the location of cursor into the variable (associated with this keyword) and SFLCSRRRN returns the relat ive record number where the cursor is positioned. The CHAIN operation copies the record's data to the input buffer for the program.What's the difference betw een CHAIN and SETLL? Is there a performance advantage? There are two important d ifferences between CHAIN and SETLL. 740. 741.... The CHAIN operation applies a record lock to files that are open or update.737. 738. T he SETLL operation does not. What are different type of Sub files ? There are three types of Subfil e (1) Load all Subfile (Page Size = 9999) (2) Extendable Sub file (Sub file size > Sub file page). What is difference between Command Function and Command Attention key? Comm and function key returns variable value along with response indicator (associate d with CF key) where as Command attention returns only the response indicator va lue. What is SFLROLVAL keyword used for ? It specify the number of records to roll in a subfile.times f rom sub file after reading them once. (3) Load by Page (Sub file size = Sub file page) 739. 742.