1. Define a shared access path? To share the open data path by various programs in a same job. 2.

What is the difference between array 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 various 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 variable s. 4. How can you execute a command from within an RPG program without calling a CL P program? By calling QCMDEXC application program interface we can execute a CL command wit h in an RPG program. 5. What is the purpose of the N C KEY CHAIN FILE N 99 in the following calculation specification?

If you specify N in 53rd position, the record will not be locked if you try to rea d the locked record. It is a way of avoiding the record lock. 6. Which of the following operations does NOT zero the field FLDA defined as 4,0 ? C C C C C C C C MOVE *ZEROS FLDA Z-ADD *ZEROS FLDA Z-ADD 0 FLDA MOVE *ALL 0' FLDA SUB FLDA FLDA MOVE 0000' FLDA CLEAR FLDA MOVE *BLANKS FLDA

The last instruction does NOT zero the field FLDA. 7. How can you check for a records existence without causing and I/O (CHAIN/READ )? With the help of File Information Data Structure, we can check existence of reco rds in a physical file. The 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 caus ing I/O operation. 8. Define what a data area is along 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 unique customer number is generated whenever a new customer i s added to customer master file. Data area keeps track of last record added and add 1 to it. Through program we c an access new customer number.

9. Define what a data queue is along with a brief example of what it may be used for? Data queues provides communication 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 t o 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 initializing the variables in I-spec. and these are further used in C-spec. 11. What is the difference between UDATE and the system date? UDATE supports two-digit year. The format is *MDY (MMDDYY). *DATE (system date) supports four digit year. The format is *MDYY (MMDDYYYY). 12. List some of the commonly used commands for debugging STRDBG(for batch jobs), STRISDB. 13. Define the RCVF command? RCVF command used to receive the records either from the data base file or devic e file. 14. Define the purpose of the %SST function? To extract the information from the specified string. 15. Define the purpose of the *CAT function? To concatenate 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 DOWxx and DOUxx operations? DOWxx : If the condition becomes true, then only the group of instructions allow ed executing. DOUxx : Irrespective of condition, it will 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 repeate dly. 20. List the steps/commands necessary to accomplish the following: a. Copy data from the file ORDHDR into file ORDHIST b. The file ORDHIST may or may not exist c. If the file ORDHDR does exist, it may or may not contain data d. The file ORDHIST may or may not contain data, if the file does contain data t he old data should be erased Commands: a. CPYF FILE(ORDHDR) TOFILE(ORDHIST) b. CPYF FILE (ORDHDR) TOFILE (ORDHIST) CRTFILE (*YES) c. CPYF FILE (ORDHDR) TOFILE (ORDHIST) *ADD d. CPYF FILE (ORDHDR) TOFILE (ORDHIST) *REPLACE PIQA Rotating Header Image AS-400 AS400 Interview Questions and answers Part II

Aug 8th, 2010 by admin. 21. What is the purpose of the following? FORDHDR1 IF E K DISK ORDHDRF KRENAMEORDHDRF1 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 similar 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 ORDERR copy book is copied into the ex isting program. Where as /COPY is compiler directive statement. 23. What is the purpose of the following FORDHDR1 CF E WORKSTN $2SFN SFILE FMT2 The above line indicates that, $2SFN is a relative record number and FMT2 is nam e 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 variables in I-Spec and these are further used in C -spec. Where as U indicates data area data structure? The above code is used to update the data area value through the program. The l etter U indicates that the defined data structure is a data area data structure. 25. What is the purpose of the following? A CSRLOC (F1ROW F1COL) Using this record level keyword, you can specify cursor location on an output op eration to the record format you are defining. The program sends output after setting the cursor location. 26. What is the difference between SFLCLR and SFLINZ? SFLCLR : It clears the subfile. SFLINZ : First it clears the subfile and initiliazing 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. Define what the operation will do, the purpose of the result field and the p urpose of *IN66? HI LO EQ C CALL CVTDAT DTPRM 66 The above statement causes, call the program and pass the parameter. 29. Define each of the following operation codes a. READ To read the records sequentially.

31. when the same file of type U used in different programs. 30. We can use at all the times. e. Generally it will happen. This indicator automatically set on whenever overflow occurs on a type of page. CALL the program 4. 33. we can get system defined message i. it reads the records from the data base file based on indicator specified on HI position. the program will ended abnormally. FNAME 3 JOHN MNAME 4 WATSON LNAME 6 . REDEP To read the equal key previous records. READE To read the equal key records c. READP To read the previous records d. Otherwise. 34. How would you join 3 separate fields. then only CAL L statement will execute. OVRDBF with SHARE (*YES) 2. How can you detect and handle a record lock situation? If you try to read the locked record. READC To read the records from the workstation file (Subfile). DLTOVR 5. If the specified indicator on LO position becomes *OFF. How can you detect overflow for a print program that prints multiple lines p er cycle? You specify the indicators OA through OG and OV in 33 34 columns in a printer fi le. When would you use or not use this approach? It is the most desirable method in building a real time applications. The process involves following steps: Steps: 1. how would this be wri tten in RPG ILE) HI LO EQ C *IN66 DOUEQ *OFF C KEY1 CHAIN FILEA 90 66 C 66 CALL PGM1 PRM C ENDDO Whenever the indicator *IN66 becomes *OFF.b. OPNQRYF 3. How would you design the process for a nightly. CLOF 36. high volume check producing process that needs to select only records that are flagged to be processed? With the help of OPNQRYF Clp command. How do you set the keywords SFLSIZ and SFLPAG if you want the subfile to dyn amically expand? SFLSIZ > SFLPAG. . e. the control transfers after ENDDO sta tement. 35. we can select the records from the data ba se file. 32. middle initial and last name together as 1 field with proper spacing? You can describe in either and/or RPG ILE (Integrated Language Environment) MOVE MOVE MOVE Dr. a first name. Define the purpose of the following code (If you know. With the help of File Information Data Structure we can handle record lock situ ation.

What is the purpose of Level Check parameter in a Physical file? . 43. 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 factor2 value. Cost = $110. When PGMA calls PGMB for the first time PGMB executes the *INZSR. the *INZSR will not execute again. c. When PGMA call PGMB the second time is the *INZSR executed? If you specify RETRN in called program. b. d. 42. PGMB uses the RETRN operation to return to PGMA. 00 Tax = 20% MarkUp= 05% Sale = 10% C Eval TotalCost = ((Cost * MarkUp) * Tax)) Sale = 1.FNAME CAT MNAME: 1 VAR1 8 VAR1 CAT LNAME:1 VAR2 15 DSPLY VAR2 MOVE *ON *INLR 37. 41. 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 MSG(&RCVD) TOUSR(*USRPRF) ENDPGM 39. Determine the value of the result field a. 0$ 40. Show 2 ways to convert a date from YYMMDD to MMDDYY (MULT operation not acce ptable) 1) CVTDAT DATE() RTNVAR( ) FROMFMT( ) TOFMT( ) Source code is required to convert from one date format to another date format. 38. the indicator specified in EQ comes *ON. Describe the function of SETLL operation in RPG language? The SETLL operation positions a file at the next record with a key or relative r ecord number that is greater than or equal to key or relative record number specified in factor1. Describe the function of SETGT operation in RPG language? The SETGT operation positions a file at the next record with a key or relative r ecord number that is greater than key or relative record number specified in factor 1.

QCTL. What are different types of Substems? QBATCH. 56.Specifies whether the level identifiers of the record formats in the physical fi le are checked when the file is opened by the program. 51. 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. 55. 44. 50. * The job is created (job name is assigned. 46. 53. . 49. QCMN. Define a Batch Job? * A user request the job. So you don t have to create permanent files for every combination of attributes your application might need. Define Subsystem? Subsystem is nothing but it provides specialized environment to complete the exe cution of jobs. 48. Define Data Structure? Data structures are specified in the Input specifications of an RPG/400 program to define an area in storage and layouts of related sub fields. QINTER. Describe about Query/400? Query/400 is a licensed program that uses a query to analyze and select the info rmation contained in the data base files and create a query report. QBASE. A query report can be: * displayed on a workstation (screen) * printed * stored in another database file. 52. Purpose of Overrides? The basic purpose of Overrides is to temporarily change the attributes of a file . * Output generated by the batch job is placed on an output queue. Define a Output Queue? Output queues are queues of jobs waiting to be printed. Overrides gives you the f lexibility to use existing model files and dynamically change their attributes. QSPL. 47. What is the function of CRTDUPOBJ command? To create the replica from the original object. * The spool sub system prints the output on the output queue. What is the CLP command to access a Query/400? WRKQRY 54. Define a Job Queue? Job queues are queues of batch jobs waiting to be processed. What is the purpose of Data structure? * Divide a field in to sub fields * Change the format of a field * Group non-contiguous data in a contiguous format * Define an area of storage in more than one format * Define Multiple occurrences of data structures. 45. What is the function of CPYSPLF command? It copies the spooled file to the data base file. What is the function of CPYF command? To copy the data from the one file to another.

. 58. letter U must be entered to define the data structure as a data area data structure. But access path occurs be fore the file is read (but not necessarily). Where can you specify an indicator in LOKUP operation? In EQ position. What is a Physical file? Physical file nothing but a table contains a only one record format in which we can describe the field definitions and descriptions. * File information data structure A file information data structure provides exception/error information that may be occurred when processing a file during program execution. 60. 50 (Fifty including eight printer file) 97. 101.57. its data is implicitly retrieved for processing and written back at the end of the program. OP NQRYF creates temporary access path. Specifically. What is maximum number of Arrays allowed in RPG? 250 (Two hundred and Fifty ) 98. it selects the records from the specified file. This type of data structure 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 operation being processed when the error occurred * The status code number * The RPG/400 routine in which the error occurred. *ROUTINE. What is a Logical file? It is nothing but a logical view provided by the physical file. What is a Member? It is a subset of data records of a physical file. In the data area data structure. keywords including *FILE. 100. What is the difference between access path and Dynamic select? Dynamic select occurs whenever the program reads file. *PARMS are supported by a program status data structure. List and explain the different type of data structures? * Data area data structure When the data area is defined in an RPG/400 program as a data area data structur e. Then on the Select/Omit criteria. Why would you prefer OPNQRYF than logical file? The main difference is : Logical file creates permanent object on the system. Exception errors may be controlled by testing for an error code in the *STATUS f ield which is included in a file information data structure. * Program status data structure Program status data structure however identity exception/errors that are generat ed in the program by RPG/400 operations and not by a file. 59. 99. What is the purpose of DYNSLT keyword? This is a file level keyword used in a logical file. *OPCODE. If you specify this in a fi le level. Four ke ywords *STATUS. *PROGRAM. Because access path maintenance performed on the file. *ROUTINE prov ide the previously named information. the system doesn t perform record selection until the program reads file. *RECORD. Note that any code greater than 00099 is flagged as an exception/error. *STATUS.

What is default data type for the fields(sub fields) defined in data struct ures in RPG? Zoned decimal 112. We have to define it in a file leve l. 113. Key field level. What is the difference between Packed decimal and Zoned decimal? Packed decimal : One digit occupies 1 byte. They are File level. The S/O is allowed in Log ical file only. 109. But we have to give record leng th. O are to defined at key field level.102. What is the use of UNIQUE keyword and what level it is defined? It will avoid to enter duplicate key values. Is it possible to create a physical file without DDS? Yes. What are the necessary keywords for the Join Logical file? JDFTVAL. This is also called as regular logical file. The purpose Select/Omit logic is depends on the criteria (condition) given at the key field level (At function entry) it selects and omits the records. JOIN. Field level. 107. How many levels are there in a Physical file? Four levels. What is default data type (if you define decimals Packed decimal 0') in Physical file? 111. The maximum of number of files allow ed to join is 32 (thirty two). 115. What is the necessary keyword for Non-join logical file? PFILE (which is record level keyword) 106. Zoned decimal : One digit occupies 2 bytes. With the help of CRTPF we can achieve this.O are defined and what they will do? S. What is Join Logical file? Join logical file joins more than one file. JFILE. At what level S. 117. What is a composite key? Defining more than one key as a key field in physical file. even the primary file record does not matc h with secondary file record. 103. What is a Non-join logical file? It only provides logical view based on the physical file. Record level. 108. What is the maximum number of key fields allowed defining in a physical fil e? . 116. What is a Keyed physical file? Defining a field as a key in physical file. 105. JFLD. the join takes place. 110. Hence we can access records through the key field. JREF. 114. What is the use of JDFTVAL in join logical file? If you specify JDFTVAL at file level. What is arrival sequence? The records will be accessed the way in which records are added to physical file . 104.

* In order to define a named data structure as a file information data structure . What is the native language of AS/400? RPG/400 120. How do you know that records are locked? By using a command WRKOBJLCK. Why RPG/400 is famous? * Easy to code and analyze. What are the different types of Data Areas? The different types of Data Areas are general data area. 127. It is not associated with any library. * Supports externally described files. It is automatically created and deleted by the system. It can be created. * In order to rename the record format of a database file in a program. 124. you need to be open and close files explicitly in a RPG program. tape files etc. . *General Data Area It can be created by user implicitely or explicitly It can be referred by any other jobs. we can use indicators in RPG. we can access the data area record in to the program. printer files.120 118. 126. What is acronym of RPG? Report Program Generator 119. discket files. What is the purpose of Indicators in RPG? In order to control the logic flow. When do you use F-spec. How many specifications are there in RPG/400? What are they? There are seven specifications are exits in RPG/400. 128. 123. How do you read data area in an RPG program? With the help of IN opcode. * Local Data Area It can not be referred by any other job. 121. . local data area. group data area. deleted by the user. *Group Data Area It is automatically created and deleted by the system We can access the group data area value through clp. pip (program initialization parameter data area) data area. They are listed below: * * * * * * * Header Specification File Description specification Extension specification Line counter specification Input specification Calculation specification Output specification 122. When do you explicitly open files and close files in an RPG program? If you specify the letter U at column 73-74. 125. continuation line ? * In order to refer the named record format as a subfile record format in the pr ogram. What are the various types of device files? Display files. It can be associated with a library.

*Pip Data Area It is meant for pre start jobs. 0 Release 2. 133. 142. 138. Which single RPG opcode performs both SETLL and READE? CHAIN 131. What are various techniques to pass parameters from one program to another? PLIST. 0) 134. In this method all o bjects are referenced by one virtual address which is translated in to a physical address whether it is an auxiliary storage or main m emory. What is Spool file. QUSRTOOL. 129. What is library list ? A list that indicates libraries used for the process and the order in which it h as to be searched System identifies it in *LIBL. Why is AS/400 called Object Oriented Machine? Everything on the AS/400 System that can be stored and retrieved is contained in the object. 137. What is a Library in AS/400? A library in AS/400 is an object that serve(acts) as a repository for other obje cts. What is term CUA . How many libraries can be there in library list ? Total 40 (15 system and 25 application) 141. What are the attributes of a Job? A Job is a basic unit of work on AS/400. Why is it required? A file that holds output data to be processed. QCBL. What is the version of OS/400 that we have? V4R2 (Version 4. Name few IBM supplied libraries? QGPL. QRPG 139. 143. What is Job. QSYS. 136. QTEMP. What is an Object? An object is any thing that exists in and occupies space in storage and on which operation can be performed. such as information waiting to be printed. What is Folder? A Folder is a named object that is used as a directory for documents and other f olders. 135. TFRCTL 130. Folders can be filed with in another folder.It is meant for group jobs. SAA? Common User Access System Application Architecture 132. CALL. How are the objects stored on AS/400? All objects are stored on AS/400 in a single level storage. The attributes are: . 140. What is DDM ? Distribution Data Management is a function of the OS/400 that allows an applicat ion program or user on one system to use database files stored on remote system.

What are the two main attributes. 152. What is a Device file? A device file contains the description of how data is to be am from a device or vice versa. What is an ICF file? A device file that allows a program on the system to communicate with program in other system. What is the purpose of OPNQRYF (Open Query File)? OPNQRYF is used to select certain records of the database file based on the QRYS LT (Query select ) condition. One subsystem can have more than one active 149. What is Group Job? A Group Job is attached to one workstation and a user. message q ueues. 151.Job Number Unique system generated sequential number Job Name Any user defined name (Max 10 char) User Name Who initiated the job. 150. It is as though logging into the same user-id many times. thus preventing other users from processing at the same time. The group jobs can have different library lists and different output. and action performed by the system on the log. which govern the execution of a job? Run time priority and Time slice 148. 144. What is a message file? It is a file which contains the messages of an application. What is Data Area? Data area is an object used to hold data for access by any job running on the sy stem. The system program maintains it. presented to a progr Disk. . What is a job log? A record of request submitted to system be a job. Tape and Remote system. What is Sub-System? Sub-Systems are specific user defined partitions of the CPU ay be executed. 145. The message related to the req uests. What is the difference between Interactive & Batch Job? Interactive Job: A Job started for a person who signon to a workstation. Group Job is useful in enhancing the programmers productivity. How to create files dynamically without DDS? Through OPNQRYF 155. A data area can be locked to a single user. For example all RPG/ 400 messages are stored in a file. Batch Job : A predefined group of processing actions submitted to the system to be performed. There should be an initia l group job and it can be branched to many other group jobs. 153. Device file can be Printer. 147. where various jobs m job at a time. What is Job description? A Job description defines an environment in which a batch job or an interactive job to be executed. all COBOL/400 messages are stored in a file. 154. What command must be executed before executing OPNQRYF command? OVRDBF (Override Data base file) 156. 146.

Local Data Area (LDA). Program In itialization Parameter (PIP) Data Area. *READ. What are the different ways to input data into data area? CHGDTAARA (using CL) Using OUT opcode in RPG 163. *CHANGE. Using IN opcode in RPG 164. What are the types of data areas? User defined Data Area. *OBJ OPR . 161. What is GDA? The system creates a GDA when an interactive job becomes group jobs. How to create a user defined (general) data area? Using CRTDTAARA command 162. and read without lock. jobs started on the system by a reader. What are the valid data types in Data Queue? Char. Numeric. 170. What are the types of object authorities? *USE. How to retrieve data from data area? Using RTVDTAARA command in CL.157. 167. What are the two types of read performed on data queues? Read with lock. Group Data Area (GDA). length of a LDA? *CHAR. NUMERIC and LOGICAL 165. What is the type. Only one GD A can exists for group. and Logical 169. *UPD. 159. *ADD. What is the use of Data Queues? Data queue is a type of system object that you can create. and subsystem monitor jobs. 1024 bytes 160. *EXCLUDE. How do you use DEBUG utility? STRDBG program-name UPDPROD(*YES) 171. *ALL. *OBJMGT. Data Queues are used in Program to program communication. The sy stem identifies it an object type *AUTL 172. including auto-start jo bs. 158. What is LDA? LDA is created by the system for each job in the system. 168. What are the valid user defined data area types? CHAR. *OBJEXIST. How can a data area be locked after being updated? Using OUT *LOCK 166. What is an authorization list? A lists of two or more user Ids & their authorities for system resources. How to create a data queues? Using CRTDTAQ command. *DLT. How do you grant authority? Using GRTOBJAUT command 173.

182. What is the use of OVRDBF ? You can use the Override with Database file (OVRDBF) command to replace the data base file named in a CL program or to change certain parameters of the existing database file. 179. . How to see active jobs of the system. Join level. 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. 177. Field level. Record level. 180. Select/Omit l evel. Commitment control is a function that allows you to define and process a number of changes to database files as a single unit (transaction). permanently? Using CHGPF command 178. 183. 184. What is class of service ? A set of link and node characteristics associated with a session. 176. What are the functions of Remote Job Entry (RJE) ? Allows user of AS/400 system to submit jobs and receive jobs from a host system. journal and PFs to be journalled. What is journaling & Commitment Control? Journaling is a function which records the changes in a file in a journal. How do you put jobs in batch mode? SBMJOB 175. 188. What process the command SBMRJEJOB does? Sends RJE input stream to host system 185. 187. Using WRKACTJOB command 181. 189. How do you detect unused spool storage? Using Reclaim Spool Storage. record wait tim e etc. What are the system objects required for journalling? Journal receiver. Keyfield level. diskette. or device file. What is the use of OVRPRTF ? Override with Printer file (OVRPRTF) command is used to override certain paramet ers of the printer files used in the program or to replace the printer file. What the difference between Source Physical File and Physical File? A Source Physical File contains the source for the various objects created this file has specific structure. What are the different definition levels in Data Description Specifications ? File level. How to change file attributes such as size.174. file wait time. What is the purpose of STRCMTCTL command? Starts commitment control for files that are being journalled. 186. What is the function of RJE Conversion Utility? It converts compressed data written to an AS/400 database file to decompressed d ata written to another AS/400 database.

195. What is the use of DSPATR(MDT) keyword? Sets on the modified Data Tag of the field. When does the DFT keyword in PF be used? To specify the default value it a field. What would be the effect on the field where reverse image. What the purpose of OVRDTA. 194. 190. 206. What is an access path? The order in which the database fields are organized for processing in the progr am. which keyword would h ave priority? CSRLOC gains priority. What is the default value for the number of increment for the physical file ? Three 193. through CHKMSGID keyword. What are the different types of keywords in display files? File level. 203. RANGE or VALUES keyword be overri dden? Yes. . 204. Can fields be concatenated INa logical file level? Yes. and the record format can be different for differ ent physical files.A Physical File contains data. by using CONCAT keyword 197. Record format level. When would the ALL keyword be used? Use with Select or Omit. OVRATA keywords? OVRDTA keyword (field or record level) can be used to override the existing data contents of a field or record already on the display. 199. What is the maximum number of records you can specify in a display file? 1024 201. 202. What is Multi-format logical file? Logical which uses fields from two or more physical files. 191. Field level 200. How can a screen field that has changed since the last output operation be detected ? Attach the MDT (modified data tag) attribute to the field. Keyed sequence access path. Can error messages as a result of a COMP. to select/omit records. 196. 205. If DSPATR(PC) and CSRLOC were specified for a format. 192. The Data Tag detect whether the fiel d has been changed as a result of user input. underline and hi ghlight display attributes were active? The result is same as if you had specified ND. to detect whether fie ld has been changed as a result of user input. What are all the different types of access path? Arrival sequence access path. What is the Select and Omit criteria in logical file? This is used to specify rules for the Selection/Omission of records from a Physi cal File.

and subfile control record forma (SFLCTL). Maximum number of subfiles that can Defined in a RPG program for one displa y file is 24 220. 512 219. ASSUME: It is used to specify that the OS/400 program is to assume that this rec ord is already shown on the display when this file is opened. What is the purpose of the INDARA keyword? This File-level keyword is used to remove option and response indicators from th e buffer and places them in 99-byte separate indicator area. 207. In conjunction with what other keyword must OVRDTA and OVRATA be used? PUTOVR keyword must used. SFLSIZ : it is an attribute which specifies the number of records can be stored in subfile. Explain the purpose of KEEP and ASSUME keywords? KEEP: Keep the display from being deleted when the display file is closed. Su bfile Record Number. Explain the use of DFTWRT display keyword? No records will be displayed until there is any I/O operation. What is Subfile? Subfile is group of records of same record format and can be read from or write to the display in a single operation. Can more than one subfile record be displayed on one line? Yes. 216. 213. 217. What is SFLPAG and SFLSIZ ? SFLPAG : it is an attribute which specifies the number of records that can be di splayed in a screen. What keyword must be used with PROTECT keyword? OVERLAY 214. What is the maximum number of subfiles that can be specified in a display f ile. 211. What is the purpose of FRCDTA keyword ? Immediately display a record format without waiting for the next I/O operation.OVRATA keyword (field or record level) can be used to override the existing disp lay attributes of a field or record already on the display. 212. 208. 218. What are all the contents of subfile? Subfile Record Format. by using SFLLIN keyword. What are the two record formats a subfile contain ? Subfile record forma (SFL). How can a message from a message file appear as a constant on the screen? By using MSGCON (message constant) keyword. 222. Associated Subfile Keywords. 210. 209. Subfile Control Record Format. 215. How do you specify the number of records to roll in a subfile? . Maximum number of subfiles that can be active for a single file is? 12 221. Relative Record Number.

How to pick up the changed records every time in a subfile after the first change made? Seton SFLNXTCHG keyword indicator and update the subfile record. Program message. TCAT Truncates all trailing blanks in the first character string. line display of a particular re 227. Explain the difference between defining Subfile and Message-subfile? Subfile record is defined by SFL keyword. 226. You cannot declare more than one object (file) in a CL programme. How do you pass parameters in CL? Using PARM keyword. provides informaion about generating and running programs. TCAT. Use subroutines. 223. 235. Use the concept of subfile (to display more than one record). How will you display a particular page in subfile? Move a valid relative record number (RRN) in the field specified using SFLRCDNBR keyword in DDS. 225. but a single outpu t message subfile is a special type of subfile that is supported well in CL. 224. What is the use of Header Specification in RPG/400? It identifies by H in column 6. 230.Use SFLROLVAL keyword in DDS along with number. BCAT? CAT Concatenate two variables or constants into one continuous string. What is difference between CAT. CHAR. which specifies the number of re cords to scroll at a time. then the two character strings are concatenated. BCAT Truncates all trailing blanks in the first character string. one blank is i nserted. What is the maximum length of a variable name in CL? Maximum 11 characters (including & ) 234. Use Program described files. User message 232. What is the use of SFLEND keyword? By specifying this keyword. Break message. How to trap errors in CL? By using Monitor Message Command (MONMSG) 233. 228. What are the limitations of CL (compare to RPG) ? you can not use CL program to ADD or UPDATE records in database files. Use Printer or ICF files. How to toggle between single line and Multi cord in a subfile? Using SFLDROP keyword. the Bottom/More message could be displayed at end of screen. LGL 229. 231. where as Message subfile is defined by SFLMSG keyword. What are the different types of variables available in CL? DEC. . the two charac ter strings are concatenated. What are the different types of messages in CL? Immediate message.

What is a Primary File? It is used in RPG Program Cycle to automatically read records in a cycle. What is the use of E specification in RPG? Extension Specs describes all record address files. 239. arrays and tables. 250. 244. 240. What is externally described file ? All information about the fields is specified in DDS and the RPG program can use them with in the program. When will DUMP and DEBUG opcodes be ignored? If blank is specified in position 15 of H specs. 241. Give three main purposes of File specification ? To define files. 246. 238. 248. Specify different indicators used in RPG? Overflow indicators Record Identifying Indicators Field Indicators Resulting Indicators Control Level Indicators 237. 247. 237. What is a Program Described file in RPG? The field name and length of the fields are defined with in the RPG program. 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 record in a primary file. Can a indexed file be accessed in arrival sequence in RPG program? Yes. How do you specify page overflow indicator for printer files in RPG? Specify an indicator in position 33-34 of F specification. . What are Control level indicators? L1 to L9 used to identify certain fields on control fields and then used to cond ition which operations are to be processed at detail or total calculation or output time. or Combined modes ? Yes. Can you specify a display file to be used in the following modes Input. Out put. 245. In which specification the report layout can be defined? O Specification. What is the use of L specs in RPG? Line counter specification can be used to describe printer file to indicate the length of the form and number of lines per page. How many files can be defined in F specs? 50 242. to describe the files. How many printer files can be defined in F specs ? 8 243. 249.236. to assign the files to specified devices .

SBMJOB opcode is used and it is used for background processing. Q.How many maximum printer files can be used in a single RPG program? A.Can you add a record to a physical file through CL? A.Q.By using opcode XLATE.How do you write and read a value (similarly as EXFMT of RPG) using a display file in CL? A. Q.Can you update a file in CL? A.NO.How do you display a screen in CL? A. Q.Monitor the message ID (CPF0864).What is the maximum length of an OCCUR? A.SNDF.255 Q.100 Q.How many maximum parameters can be passed from on RPG program to another CL pr ogram? A. Q.What opcode is used for submit job? Why it is used? A.How many maximum arrays can be used in a single RPG program? A.40 Q.What is the full for of CA and CF? A.9999. and Deleting the existing records).By using monitor message ID: (MONMSG MSGID (CPF0000) Q.Difference between WRKUSRJOB and WRKACTJOB? .NO Q. Q.Subfile is a group of records which can be used for (Displaying. Q. Q. Q.Command Attention and Command Function.What is maximum size of a subfile? A.How do you monitor message in CL? A.Except report design what else can be done by O spec? A. Q. Q.200. Q.How many maximum loops can be used in a single RPG program? A.What is a subfile? A.What are the maximum parameters can be passed from one RPG program to another RPG program? A.9999. Modifying the existing record.How to translate field values form lower case to Upper case? A. Q.We can write a Physical File from O spec. Adding new re cord.How to check end of file in CL? A.8 Q. SNDRCVF.

During execution.What is the Function of PDM? A.Name few IBM supplied libraries ? A. Q. Q.Some more pending jobs might be there in Job Queue.Library in AS/400 is an object that serves as a repository for other objects. deleting.GPL.Problem with some subsystem. Q.File level.Change the priority or change the job queue name. Q. Q.If your workstation does not show login screen what might be the problem? A.It is a system subroutine which is executed by default when any error occurs i n a program. Q. an RPG/400 program automatically follows a sequence of opera tions for each record that is processed.You have given a job for printing and you are not getting the printout what mi ght be the reason? A.Productivity tool for copying.What is *PSSR? A.reading input (READ) 2. Q.A utility for editing programming language source code. QUSRTOOL.WRKACTJOB or WRKSYSSTS. System identifies it in *LIBL.writing output (WRITE) Q. changing & creating source files. Field level. Q.Screen Design Aid is used to create display files interactively. Record level. Q.What are the three levels of SDA? A.What is the use of SDA ? A.Why do we define MOVE *ON *INLR? A.A.processing calculations (PROCESS) 3. QTEMP.It frees the memory. 1.What is a library list ? A.Library list that indicates libraries used for the process and the order in wh ich it has to be searched. Q. QRPG & QCBL. The built-in program cycle includes the following logical steps. Q.How many libraries can be there in a library list ? . Q.How do you shutdown your IBM server? A. Q. Q.How to see the CPU usage? A. All the fields and parameters in the memory will become b lank.What is a library in AS/400 ? A.All the jobs in WRKUSRJOB are seen including Active jobs where as in WRKACTJOB only active jobs are seen. Q.What is the function of SEU ? A.Explain the sequence of execution of an RPG/400 program? A. scanning.PWRDWNSYS.There are multiple jobs for printing in job queue and you want to print a impo rtant document then what will you do? A. QSYS.

Q. Q.DDS . *TIME.Total 40 (15 system and 25 application). Q. How to read database records without locking them? Put N in position 53 of C specs. RPG.''. Q.Records with duplicate key values are not allowed. A-spec UNIQUE. What is the length of a variable in RPG? 6 Characters.Physical file contains data. What opcode could be used to test an alphanumeric field for all numeric val ues? TESTN 254. 1.What is the difference between Physical and Logical files ? A. How many record formats can you have in a Physical file and in a Logical file ? A. What opcode will be used to test the zone of a character field? TESTZ 255.What does the keyword UNIQUE mean ? A. Q.What is the symbol used to get name & length of a field in SDA? A.What is the symbol used for defining a new field in SDA? A. PFILE. REFFLD Q.What is the symbol used for copying & moving new field in SDA? A.Screen Design Aid. DSPF. where as Logical file serves as a access path to database. 251.What does SDA stands for ? A. When is a TAG statement used in RPG? It is used as Label. What does CHECK opcode is used? The check operation verifies that each character in the base string (factor 2) i . 2.Data Description Specification.'+'. PIQA Rotating Header Image AS-400 AS400 Interview Questions and answers Part vi Aug 8th. CLP.Copying : '-' & '=='. Moving : '-' & '='. Q.What is the symbol used for shifting fields in SDA? A. Q. 256. 2010 by admin. Logical file can contain mor e than one record format.Source Physical File contains the source for the various objects created.A. *DATE.Physical file can contain only one record format. This file has a specific structure. 253. PRTF.'?' . 252. etc.

How can the user implicitly open and close the files in RPG program ? Enter UC in position 71-72 of F specs. Can we define Multi-dimensional arrays in RPG? No. What is File Information Data Structure? File Information Data structure (INFDS) can be defined for each file to make fil e exception/error information available to the program. the record being processed when the exception/error occurred or the record that caused the exception/error. A file information data structure contains predefined subfields that identify: the name of the file for which the exception/error occurred. and places the sum in the result field . What is XFOOT opcode? Adds all the elements in a numeric array. What does opcode POST do? Puts information in INFDS. How do you use exceptional write in C specs? Using EXCPT opcode. How do you use commitment control in RPG program ? Using COMIT operation. 265. 259. 267. The RPG routine in which the exception/error occurred. 260. What does SR in columns 7-8 of C specs mean? Calculation operation is a part of RPG subroutine. ? 255 269. 258. 261.s among the character indicated in the comparator string (factor 1). How can we sort an array? By using SORTA opcode. The status code. 266. 257. The last operation being processed when the exception/error occurred. 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. Use OPEN and CLOSE opcodes in RPG program to open and close files. What does the opcode FREE do? The FREE operation removes a program from the list of activated programs. Makes all changes to the files that have been specified i n output operation since the previous COMIT or the begining of operations under commitment control(if there has been no previous C OMIT or ROLBK operation). 263. It does not close fil e or unlock data area. 268 How many parameters can be defined in a RPG program. XLATE operation translates characters in source string (factor 2 ) to the from a nd to strings (factor 1 ) and put into the result field. What is the maximum number of elements in an array? 9999 264. 262. 270. frees static storage and ensures program initialization (first cycle processing) the next time program is called. What is Program Status Data Structure? .

REFFLD . deleting. processing calculations (PROCESS) 3. 280. This f ile has a specific structure. 276. PRTF. Name few IBM supplied libraries ? GPL. How many libraries can be there in a library list ? Total 40 (15 system and 25 application). What are all the compiler directive statements? /TITLE. writing output (WRITE) ****************************************************************************** 275. DSPF. During execution. QTEMP. 279. A-spec UNIQUE. conventions. 278. The built-in program cycle includes the following logical steps. QRPG & QCBL. QUSRTOOL. 274. reading input (READ) 2. Source Physical File contains the source for the various objects created. /COPY 273. changing & creating source fi les. CLP. What is the use of SDA ? Screen Design Aid is used to create display files interactively. 281. AS/400 and PS/2. /EJECT. 277. QSYS. 271. and protocols that will provide a consistent framework across the System/370. /SPACE. *STATUS contains status code. What is SAA? Systems Application Architecture (SAA) is a collection of selected software inte rfaces. PFILE. DS is defined as program status DS by an S in position 18 of the DS statement. What is a library in AS/400 ? Library in AS/400 is an object that serves as a repository for other objects. DDS Data Description Specification. What is the maximum number of times Multiple Occurrences DS can occur in a program? 9999 272. What is a library list ? Library list that indicates libraries used for the process and the order in whic h it has to be searched. What is the function of SEU ? A utility for editing programming language source code. etc. System identifies it in *LIBL. an RPG/400 program automatically follows a sequence of op erations for each record that is processed.A Program status DS can defined to make program exception/error information avai lable to an RPG program. RPG. 1. *ROUTINE : contains name of routine in which the exception/error occurred *PARMS : contains the number parameters passed to this program from the calling program. scanning. What is the Function of PDM? Productivity tool for copying.

287. What is RPG ? Report Program Generator. 286. 296.& == . What does SDA stands for ? Screen Design Aid. Moving : . What keyword must be used with PROTECT keyword ? OVERLAY 299. where as Logical file serves as a access path to da tabase.& = . *TIME. 283. Is it possible to join the same file to itself ? Yes. 295. to detect whether field has been changed as a result of user input. 289. What is the symbol used for defining a new field in SDA? + . 298. Can it be used for Update ? Logical file that combines more than one physical file. What is the symbol used to get name & length of a field in SDA? ? . OVRATA keyword (field or record level) can be used to override the existing disp lay attributes of a field or record already on the display. 291. What is keyword PFILE specifies ? PFILE is used define the Physical file being referenced. underline and hi ghlight display attributes are active ? The result is same as if you had specified ND. 297. What does the keyword UNIQUE mean ? Records with duplicate key values are not allowed. 284. What is Multi-format logical file ? Logical which uses fields from two or more physical files. > . 292. What would be the effect on the field where reverse image. What is the symbol used for shifting fields in SDA? < . What is the purpose of OVRDTA and OVRATA keywords ? OVRDTA keyword (field or record level) can be used to override the existing data contents of a field or record already on the display. How many record formats can you have in a Physical file and in a Logical fi le ? Physical file can contain only one record format. Update is not possible through JLF. LIFO in Database environment ? These are file level keywords which are used to access the records in the order FCFO : First Changed First Out FIFO : First In First Out LIFO : Last In Fist Out 285. How can a screen field that has changed since the last output operation be detected ? Attach the MDT attribute to the field. 293. 300. What are the different types of specification available in RPG/400 ? Control Spec. 288. What is the difference between Physical and Logical files ? Physical file contains data.( F ) . *DATE. 290. Logical file can contain more than one record format. What is the symbol used for copying & moving new field in SDA? Copying : . What is a Join Logical File. What is FCFO.282. 294. FIFO.( H ) File Spec.

REDPE. What does opcode POST do ? Puts information in INFDS. What does CHECK opcode do ? The check operation verifies that each character in the base string (factor 2) i s among the ` character indicated in the comparator string(factor 1). 308. and places the sum in the result field . 314. 313. and WHxx. arrays and tables. 316. Where will control be passed after the execution of the *PSSR subroutine if the factor2 of the ENDSR is blank ? Control will return to the next sequential instruction. NEXT. 319.( L ) Input Spec. Can you have multiple key lists for a single file ? Yes. Can an indexed file be accessed in arrival seQuence in RPG program ? Yes. 317. 311.( I ) Calculation Spec. Execution time array. 304. How can database records be read without lock ? Put N in position 53 of C specs. OPEN. WRITE. How many files can be defined in F specs ? A maximum of 50 files. 309. 318. all are Optional. IFxx. Can we define Multi-dimensional arrays in RPG ? No. Compile time array. 306. UPDAT. READP. In conjunction with which statements can ORxx and ANDxx conditions be used ? DOUxx. What are the different Opcodes available in RPG for Database access ? READ. During input operation which indicator position is seton if there is a reco rd lock? LO indicator position is seton. 305. When is a TAG statement used in RPG ? It is used as a Label. CLOSE . 320. UNLCK. READE. What is the maximum number of subfiles that can specified in a display file ? 512 The maximum number of subfiles that can defined in a RPG program for one display . FORCE.Extension Spec. DOWxx. 312.( O ) 301. What is the use of E specification in RPG ? Extension Specs describes all record address files. What are the different types of arrays available in RPG ? Pre-execution time array. Is it necessary to define all formats ? Which are mandatory and which are O ptional ? No. In which specification can a report layout be defined ? O Specification.( E ) Line counter Spec. 302. What is XFOOT opcode ? Adds all the elements in a numeric array. DELET. 310. *NAMVAR is used to define variables as data area.( C ) Output Spec. In which specification Data Structures can be defined? I Spec. SETGT. 315. SETLL. 307. 303. CHAIN. What is the difference between *LIKE and *NAMVAR ? *LIKE defines the variables as in database.

Mandatory keywords of sub file SFL. What is SFLPAG and SFLSIZ ? SFLPAG : it is an attribute which specifies the number of records that can be di splayed in a screen. SFLDSP. Whenever a record is changed on display file. If an indicator is associated with SLFNXTCHG and it is SETON then READC will read only the changed record. How do u compile RPGLE program . SFLSIZ : it is an attribute which specifies the number of records can be stored in the subfile.file is ___ . How to pick up the changed records every time in a subfile after the first change made ? Seton SFLNXTCHG keyword indicator and update the subfile record. 324. 12 322. SFLSIZ. SFLPAG are the mandatory key words 336. SFLCTL. DR SD Create Sample Data. Can a single screen format occupy a screen area above and below a subfile f ormat ? Not possible. 335. Record level & Field level. 326. What are the three types of keywords associated with printer file ? File level. And if the indicator is not associated and it is seton it READC reads all the records from sub-file 337. NP New Page. Filler line & Sample line. DC Define Constants. 325. How do you specify the number of records to roll in a subfile ? Use SFLROLVAL keyword in DDS along with the number. CLR Change Line for Record. How can u check no of records in a file DSPFD 339. 331. 19.UPDAT and WRITE 323. 334. which specifies the number o f records to scroll at a time. What are the different opcodes used for file operation on a subfile in a RP G pgm? READ. VF View Fields. CF Centre Fields & SP Space Fields evenl y. SKIPB. How will you display a particular page in subfile ? Move a valid relative record number(RRN) in the field specified using SFLRCDNBR keyword in DDS. What is the function of RLU ? To design & prototype a report. READC. 327. What are the different commands used in RLU ? Define Record. An MDT is set ON. SPACEA & SPACEB. 329. Difference between SFLRCDNBR and SFLNXTCHG SFLRCDNBR will give the RRN of the First record displayed on the screen at a giv en time. The maximum number of subfiles that can be active for a single file is ____ . What are the three line types in RLU ? Report line. 328. 330. CLC Change Line for Continuation. What is the command used to invoke RLU ? STRRLU. How can see logical file based on which physical file and vice versa DSPDBR 338. 333. How do you combine two record formats in RLU ? Using CLC. DF Define Fields. 24 321. What are different record spacing keywords in RLU ? SKIPA. 332. CHAIN.

How will you add a field to physical file already containing data? With CPY F command and *NOCHK & *DROP 351. A service program is bound into a program or other service programs using bindin g by reference 343. It is also used to monitor user message. MONMSG commands It is Dynamically creation of access path. A service program differs from a program in two ways: It does not contain a program entry procedure. Is module executable No You need to create an RPG prog to run the module 341. Compile time gets populated at the time of compilation. if the expression is A = B + C then B and C are from the file while A is define d in OPNQRYF. How will you search an array? LOKUP 354. 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.Either thru 15 or crtrpgmod 340. What is procedure? A procedure is the set of self-contained high level language statements that can perform a particular task and then returns to a caller 342. Runtime gets populated at the time execution. 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 specifie d in FACTOR 1. 353. 355. How do you set pointers to values 55 or next higher or greater? SETGT. FACTOR2 and RESULT field for the RPG operatio n code PARM? It is add value of FACTOR1 to FACTOR2 or compare the value of FACTOR 2 with FACTOR1. What are the uses of FACTOR1. We can divert the output of command to an OUTFILE. How do handle file exception/error *INFDS .e. 348. 356. and it can have resultant fields i. 347. What are the different types of arrays? Preruntime gets populated at the ti me input. Distinguish between terminating a program through SETON LR and RETURN? LR c loses all the files used in the program and RETURN is used to return the control to the parent program. 357. Command associated with OPNQ RYF 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. What is OPNQRYF. This means that you cannot call a service program using the CALL operation.*PSSR defining it in F spec 346. What are two types of record are used in subfile? SUBFILE RECORD FORMAT and . 352. What is LOKUP opcode? Look s for a particular element of an array 344. What is service program? A Service Program is a collection of runnable procedures and available data item s easily accessible by other ILE programs. In many respects it is similar to a subroutine library and procedure library. How many files. 350. What is message file? It is file which contain messages created by the user through which a user can display own message while validating. printer files you can describe in a RPG 50 files and 8 printers 345. 349.

What is the maximum length of an OCCUR? 9999. 361. 369. 360. What is SFLROLVAL? 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). The records have read even it has not been changed due to SFLNXTCHG. 373. 384. How many maximum parameters can be passed from on RPG program to another CL program? 40 375. Adding new record. How do you read changed records backward in subfile? NOT POSSIBLE. How to fire a JOB? SBMJOB. Can you display a empty subfile? Yes by using the keyword SFLINZ and SFLRNA . 366. 368. How do you display a screen in CL? SNDF. How you will know whether you are in SFLDROP or SFLFOLD mode? Bu using the keyword SFLMODE. How many levels of security are there on AS/400? There are 10 to 50 level o f security on AS/400. 383. Modifying the existing record. What are the maximum parameters can be passed from one RPG program to anoth er RPG program? 255 374. How you get the relative record in a subfile in which cursor is located? By using the keyword SFLCUSRRN (Subfile cursor relative record number). What is ELASTIC and NON ELASTIC SUBRILE? When subfile size is greater then subfile page size it is called elastic subfile and when subfile size is equal to subfile page size it is called non-elastic sub file. 365. 385. It initial ized all the character field as blanks and numeric fields as zeros. How to translate field values form lower case to Upper case? By using opcod e XLATE. 367. What is SFLINZ and SFLRNA? SFLINZ stands for subfile initialize. Can you update a file in CL? NO. If you validate a record in subfile on some condition all the invalid records c an display in reverse image. 363. What is maximum size of data area? 9999. How do you write and read a value (similarly as EXFMT of RPG) using a displ ay file in CL? SNDRCVF.SUBFILE CONTROL RECORD FORMAT. 359. How many maximum loops can be used in a single RPG program? 100 377. 382. 376. 362. How to check end of file in CL? Monitor the message ID (CPF0864). What is a subfile? Subfile is a group of records which can be used for (Dis playing. 381. 370. What is QCMDEXC? It is used to execute a single CL command within the RPG p rogram. 379. How many maximum arrays can be used in a single RPG program? 200. How many maximum printer files can be used in a single RPG program? 8 378. Can you add a record to a physical file through CL? NO 386. The first which have changed and made valid and released still displaying in rev erse image. 387. Why do we use READC? What is SFLNXTCHG? READC is to read those records whic h have changed in the subfile. 380. SFLRNA stands for subfile record not active (It means records are there in the subfile but active). What are DDS required for SUBFILE? SUBFILE DISPLAY (SFLDSP) SUBFILE DISPLAY CONTROL (SFLDSPCTL) SUBFILE CLEAR (SFLCLR) SUBFILE SIZE (SFLSIZE) SUBFILE PAGE (SFLPAGE). 364. How do you monitor message in CL? By using monitor message ID: (MONMSG MSGI . How you will find an error which is not in the first page of the subfile wi thout using ROLLDOWN key? By using keyword SFLRCDNBR. What opcode is used for submit job? Why it is used? SBMJOB opcode is used a nd it is used for background processing. 372. and Deleting the existing records). 358. 371. What is maximum size of a subfile? 9999.

391. SFLRCDNBR is a FIELD LEVEL keyword 408. SDA: After getting field reference from reference file selected files will appear at the bottom of the screen and then which command function will be used to get it on screen with its label to be left aligned? &3L 411. ) . Which function key should be pressed to watch all strings defined on the SD A screen? F20 401. . All the fields and pa rameters in the memory will become blank. Field level. 410. 389. 397. How do you shutdown your IBM server? PWRDWNSYS. While designing the screen. SFLSIZ. 406. 390. While designing the screen using SDA. How to see the CPU usage? WRKACTJOB or WRKSYSSTS 399. SFLPAG. While designing the report using RLU. Record level. which option do you select? 17 403.99. Except report design what else can be done by O spec? We can write a Physic al File from O spec. What are the three levels of SDA? File level. From work with member using PDM screen you have to modify existing member u sing SDA. then whic h function key should be pressed? F14. 416.9999 format? EDTWRD ( . On which level should it be defined? File Level 405. You have given a job for printing and you are not getting the printout what might be the reason? Some more pending jobs might be there in Job Queue. 413. SFLCTL. What is difference between SKIPB (2) & SPACEB (2). 393. Write system defined function used to place system name on the screen *SYSN AME 404. F3 function key is kept common for all record f ormats. RLU: Which field level keyword should be used to change any numeric field o f length 8 to 99. If user wants to center the company name on his report then which line comm and will be used? CF. Write down any two mandatory keywords used when defining a subfile? SFLDSP. 392. If your workstation does not show login screen what might be the problem? P roblem with some subsystem. Which Function key should be pressed to define hidden field while you are w orking with SDA? F4 400. RLU: If user wants to define new numeric field on record format then which line command will be used? VF. user wants to add record level keywor d then which function key should be pressed? F18. Maximum report length is 132. if user is designing a report using RLU? FALS E (378 Max). 414. To change constant field defined on RLU screen which field level keyword sh ould be used? DFT 417.D (CPF0000) 388. Why do we define MOVE *ON *INLR? It frees the memory. 396. What is *PSSR? It is a system subroutine which is executed by default when any error occurs in a program. 415. SFLDSPCTL. 395. 398. What is the full for of CA and CF? Command Attention and Command Function. Difference between WRKUSRJOB and WRKACTJOB? All the jobs in WRKUSRJOB are s een including Active jobs where as in WRKACTJOB only active jobs are seen. If user wants to add one field on the report then which function key should be pressed? F11. If user wants to change the length of the numeric field defined in report t hen which combination of keys will be used? F23 & F10. While designing the screen user wants to add file level keywords. 407. 412. 409. There are multiple jobs for printing in job queue and you want to print a i mportant document then what will you do? Change the priority or change the job queue name. 394. which function key should be pressed to get the field from the field reference file? F10 402.

SPACE and SKIP are FIELD & RECORD LEVEL keywords. Which are the member types which SEU supports? RPG. 449. User (*test) & Product (*prod). 419. PF. 425. CL. What is Library List? A job s library list defines the path of libraries that the job follows when trying to locate programs. How many types of files are available on As/400? There are 2 types of files on As/400 they are Databases files & Device files. 448. 429. which is created externally & de scribed in the program. 445. 447. Type of Source File & Physical File? Source File: *PF/SRC Physical File: *P F/DTA 428. Printer file & Display file? *File 442. What are the different methods to access SEU? Use the Start Source Entry Ut ility command (STRSEU) Option 8 from STRPGMMNU Through Program Development Manager (PDM) 446. L. Which path a good programmer should use? Unqualified path. 420. 437. Types of Libraries on As/400? There are 3 types of libraries on As/400 they are System (*sys). TRUE. Can a Join Logical File be updated? No. What is the command to know key fields of file? DSPFD (F4) *ACCPTH(Access P ath). 434. What is a Spool File? Printed output items placed in an output queue are kn own as spooled files. Using Query. Using DFU. 443. user will be able to ___________ from Physical File? Add/Update/ Selected or all fields. 435. 430. In which Specs Arrays. Menu. What is the difference between normal UPDDTA to PF and updating using DFU p rogram? Both are same only difference is DFU allows you to add or change selected fields. How many types of display are available on As/400 for user interaction? 4 T ypes they are Entry. What are the basic features of SEU? Prompt depending upon type. 441. What is the object type of PF. I. Information & List Display. 440. 422. . which contain data. SEU shows prompt/syntax checking according to MEMBER TYPE. It is available for read access. What is Logical File? A Logical file is an Access path to the Physical File . its also possible to create level break reports. What is a Join Logical File? A join Logical File can be built over the two PF s. Members & User Opt ions. 432. What is Library? A library is a system object that serves as a directory to other objects or collection of object 424. What s the use of STRPDM? To work with Libraries. 427. F. 444. with the PF s joined by a common key value. E. shows right hand side date & left hand side the line number. Which is the Primary Editor of As/400? Source Entry Utility (SEU). 421. What is externally described file? A file. What is the format of As/400 Commands? Verb Object Qualifier Verb: action O bject: on which action is performed Qualifier: identifies your job 431. How can you specify no duplicate key? By defining the unique key. PRTF & DSPF .418. How many Specs are there in RPG & Which are they? There are 7 Specs in RPG they are H. 433. 423. 436. LF. In which Specs can PF be made internally? In I Specs. is called as external described file. LF. Tables & Constants are defined? In I Specs. What is Qualified & Unqualified path? Qualified path means mentioning objec t name along with library name while Unqualified path means directly writing the object name. 439. files or other As/400 objects. Objects. 426. Difference between Source Physical File & Physical File? Source Physical Fi le contains members who contain source statements & Physical File contains members. C & O. What is the command to know how many LF are related to a PF? DSPDBR (Displa y Database Relationship) 438.

What is the error if we don t get login screen? There is some problem with su bsystem. 467. 453. How many printer files maximum can be used in single RPG program? 8 because of the overflow indicators OA-OG & OV.*BLANK. The label specified must appear as the Factor1 of a TAG operation somewhere in the program. Which indicator is used for Read? EQ (Equal to) 459. LT. 462. KFLD. Difference between skip before & space before? Skip before leaves the speci fied no. File Access Opcodes? READ. 451. of lines moving to the next page while Space before leaves the specified no. Types of Data Structures? . *ZEROS. 464. 460. runs & contin ues to execute instructions without human intervention or control while Interactive job are user driven. How does the RUNQRY show the output? RUNQRY shows the output always in RRN (Relative Record Number) & not in keyed sequence. 455. Which are the Relational Operators in RPG? GT. LE & EQ. What are indicators? Indicators are inbuilt class of variables for RPG. What is the use of *PSSR in the program? Whenever there is any type error i n the program the control straight away passes onto this subroutine. 474. How can we run a Batch Job? SBMJOB Command. 477. What does the OVRDBF command do? It overrides the PF temporarily for a job. 452. 479. 468. KLIST. READP. What does EXFMT does? Write & Read. 454. What is Subroutine in RPG? A subroutine is a group of statements in a progr am that can be processed several times in that program. 463. Types of Tables in RPG? There are 2 types of tables in RPG they are: Compil e Time Tables Pre-Runtime Tables 469. Use of Data Structures? · Dividing a field into sub fields. Difference between CALL & SBMJOB? CALL performs interactively job while SBM JOB performs batch job. In O Specs what is the opcode for write? EXCPT.450. 478. Do we have to Execute the *INZSR compulsory? No. CF: It retains the value into the buffer memory. Difference between CA & CF? CA: It does not retains the value into the buff er memory. *OFF. 473. What is RPG Fixed Logic Cycle? A logic the compiler supplies is called RPG Fixed Logic Cycle. SETGT. 480. READE. Difference between Interactive & Batch Job? Batch job begins. GE. · Changing the format of a field. When you are defining a flat file in your program in F Specs which format w ill you specify? Flat File: F (Fixed Length) Other File: E (Externally Described) 457. *ON & *ALL. 466. it is a system-defined sub routine it is executed automatically. 458. SETLL. 456. Which are the figurative constants used in RPG? *ZERO. Difference between GOTO & EXSR? EXSR is a conditional branching while a GOT O is an unconditional branching. What does LOKUP does in Tables & Arrays? The LOKUP opcode searches the Fact or1 entry in table or array. · Grouping non-contiguous data in a contiguous format. Maximum number of Records in Display File? 1024 476. READPE CHAIN. 471. 475. What is the syntax for PLIST? *ENTRY PLIST PARM 461. What does VLDCMDKEY means? Valid Command Key. *BLAN KS. · Defining an area of storage in more than 1 format. of lines on that page. What is CAB? It compares Factor1 with Factor2 & if condition is true. *HIVAL. contr ol is transferred to label designated in the result field . *LOVAL. 472. 470. 465. How to run other job when one job is active? Change the priority or rename the job. EXCPT & WRITE.

data elements Must be of same type and same length. What is a trigger? A trigger is an action that automatically occurs wheneve r a change Is made to a physical file. What is DBMS? A DBMS is a software system that controls the creation. 492. Some of the object types on which locks can be allocated? Data Area. Message Queue. 496. Which users are allowed to manipulate system libraries? QSECOFR & QSYSOPR 487. How do you place or remove locks on the objects? *AACOBJ & *DLCOBJ 495. How can we add & remove trigger to a PF? ADDPFTRG & RMVPFTRG 501. Multiple Occurrence Data Structure. Program Status Data Structure. User Defined Data Structure. 481. b. File. Join Logical Files have always one record format. 503. Used for externally described files given when file types are? I & U 502. Can the objects stored in the product library be modified? No. What is the command to shutdown the As/400 Server? PWRDWNSYS & Parameter *I MMED. How is data stored in PF s? In fixed length records. How many triggers can be associated with a single PF? 6 (max) 499. F is the type of file desg. 488. *SHRUPD : All jobs can read/update the object. 498. How many types of objects are there on As/400? 80 489. What does print writer do? It is a system job that selects files from the o utput queue & prints Them on a printer. What is a Join Logical File? A Join Logical File combines information from two or more physical files into one record format. 484. What is a table? A table is collection of data elements in one column. 493. . 505. Menu &Program. c. 494. Which are the libraries (system) always present in the library list? QTEMP & QGPL 486. What is Subfile? A Subfile is a temporary area in memory which records may written to & read from a display file device. Does the SETLL & SETGT retrieve the record? No. What are the 2 types of lines on O Specs? Record Identification Line & Fiel d Identification Line. they simply position to the record. Give an example of DEFN opcode? *LIKE DEFN ENAME $ENAME (Now the $ENAME has all the attributes same like ENAME) 491. What is an Output Queue? They are the holding areas that store printed outp ut generated from Batch programs or Interactive applications. How can we know the CPU utilization of the server? WRKACTJOB (Work with act ive job) WRKSYSSTS (Work with system status) 485.a. e. Date Area Data Structure. 490. It provides the interface between output queue s Spooled files & the printer. Types of Object Locks & what they do? There are mainly 3 types of locks the y are as follow: *EXCL : Only the routing step holding the lock can use the object *EXCLRD : Routing step can read/update the file other jobs can only read. Library. 507. File Information Data Structure. Which is the subsystem that is always on till the main power switch is off? QCTL 483. 500. 508. d. What is the opcode to release all the locks on a particular PF? UNLCK 497. 504. 482. 506. Can a Subroutine contain another Subroutine? No. What is a Compile Time Table? We can hard code data within the program is s aid to be Compile Time Table. Data Q ueue. organ ization & modification of a database & access to the date stored within it.

Which function key should be pressed to define hidden field while you are w orking with SDA? F4 541. If user wants to center the company name on his report then which command w ill be used? CF (Center Field) 535. 512. What is an Array? Array is a collection of data. The function key to start SEU session through program development manager i s? F6 522. The members in a PF contain data? (True/False) True 518. What is the command to view the library list? DSPLIBL 519. The LF is associated with how many PF s? At least one PF at a time. 514. it uses the concept of Alternate Table. Change in the externally described file does not require recompilation of t he program? (True/False) False 527. 531. What is the difference between UPDDTA to PF & updating using DFU? Both are same. What is a Run Time Table? Data from a separate disk file is loaded into a t able each time the Program runs. What is the command to create PF? CRTPF 520. The command to display a list of spooled files? WRKSPLF 526. If user wants to add one field on the report then which function key is pre ssed? F11 534. 540. Write system defined function used to place system name on the screen? *SYS NAME . It is possible to run Query using RUNQRY command? YES 537. Consider the following command: WRKOBJ OBJ (*ALLUSR/DBTMEF) Object DBTMEF i n all libraries except system libraries. Printed output items placed in an output queue are known as? Spool Files. Give the Table definition? TABMT 1 12 2 A Where 1 = Number of entries per r ecord 12 = Total number of entries 2 = Length of each entry A = Ascending Sequene 511. 516. 524.509. Update & Select fields 539. 513. The members in a Source Physical File contain? Source statements for a prog ram. Command to display current library is? DSPCURLIB 528. The Qualified name for an object ORDPF residing in a library TRAINING is? T RAINING/ORDPF 515. Library on the bottom of the library list & Current library? Current library 530. Which function key should be pressed to watch all string defined on SDA scr een? F20 542. Using Query it is possible to create level break report? YES 538. 521. the data elements must be of same Length and same type. it is placed into an? OUTQUEUE 525. While designing the screen user wants to add file level keywords then which function key is pressed? F14 532. SEU shows prompt/syntax checking according to? Member Type 536. While designing the report using RLU user wants to add record level keyword s which function key is pressed? F18 533. only difference is DFU program allows you to add & update selected fields. Library QGPL. From WRKMBRPDM screen you have to modify existing member-using SDA which op tion do you select? 17. The Member type for an RPG & CL program which SEU supports is? RPG & CLP 523. 543. What is Alternate Table? RPG tables stores information in 1 column. While designing the screen using SDA. 544. 510. To stor e information in multiple columns. A PF can have how many record formats? Only one 529. 517. Using DFU user can do which operation? Add. When a spooled file is created. which function key should be pressed to get the field from the FRF? F10. The members in LF contain? Access Path. Which one of the following has the highest priority Library on top of the l ibrary list. If the data is likely to change over a period of time & Moreover data is la rge than which type of table is preferred? Compile Time Table.

549. What is SQL? SQL is an interface for programming language. divide fields into sub fields & to form a group of fields. What is L Specs for? To tell length of page & number of lines to be printed on a page. SFLCTL & SFLPAG 547. constants. currency symbol etc. 570. What are the different File Format Types in RPG? F (Fixed Length) & E (Exte rnally Described) 565. What is I Specs for? To describe the records within Program described file. if user is designing a report using RLU? FALS E (Maximum is 378) 551. File level entry for a PF can be? UNIQUE & FIFO . 567. 578. 574. 566.) 561. 559. A Join Logical File has how many Record formats? 1 554. 576. O (Output). How does Union file maintains Record formats? 1 Record format for each PF 556. An access path may be in which sequence? It can be in Arrival & Keyed seque nce 575. Write down mandatory keywords used when defining a subfile? SFL. fields. *ROUTINE & *PROGRAM 572. RLU: If user wants to define new numeric field on record format then which line command will be used? VF 550. Space & Skip are which level keywords? Field & Record 553. Maximum report length is 132. SF LSIZ. To change constant field defined on RLU screen which field level keyword sh ould be used? DFT (Default) 552. DB2 is a type of Database? It is an Integrated RDBMS.545. when & who invented it? Report Program Generator is IBM introd uced a High Level Language in 1960. A Multiple format Logical File is also known as? Union File 555. CHECKR. What is the difference between SKIPB (2) & SPACEB (2)? SKIPB (2) skips 1 pa ge & on the next page after skipping 2 lines space print next while SPACEB (2) skips 2 lines space before printing. Which are the four keywords supported by Program Status Data Structure? *ST ATUS. Records can be Read/Update/Deleted with which file? Simple Logical File & P hysical File. What s the use of File Designation in RPG? It refers to the way program will access or retrieve the data from the file. What is the size of the filename in RPG? 8 Characters (Max. date separa tor. 562. Which type of object is used in DB2/400? *FILE 577. 568. What are the different File Designation Types in RPG? P (Primary) & F (Full y Procedural) 563. 558. SUBS T & CAT 573. If user wants to change the length of the numeric field defined in the repo rt then which combination of the keys will be used? F23 & F10 548. *PARM. CHECK. which purpose is H Specs used? Writing header information. SFLDSP. Which are Control Break Logic indicators? L1 L9. What if RPG. How many maximum spaces could be given in O Specs? 3 569. What are members? Members are separate entities within a database file & th ey are components of As/400 object. 571. U (Update ) & C (Combine). 564. What are Data Structures? Data Structures define an area of storage & layou t of fields within the defined structure. While designing screen F3 function key is kept common for all record format s on which level should it be defined? File level 546. For. Which are the different File Types in RPG? I (Input). SCAN. What is full form for DDS? Data Description Specification 557. Which are the String Manipulation Opcodes? TESTN. 560. What is the use of File Format in RPG? It tells to the program that the rec ords are within the program (F) or outside the program (E).

587. A Query can be displayed without saving it? True 582. How to determine if the record is in used by another user ? We can determine weather a record is in use bye another user with the help of st atus code (*STATUS). When are the Referential Constraints executed? Insert. . 595. record already locked. Which are the DB2 tools to protect Integrity of the database? Journaling & Commitment Control. Referential Integrity Embedded SQL & Object/Record Locks. If *STATUS = 01218 i. Which CL command is used to trap error messages during program execution? M ONMSG 599. A file cannot have more than 1 unique key? False 593. 591. When are the Unique Constraints executed? During Insert. How to write *PSSR ? It just similar to any other subroutine. the function key to be pressed is? F9 584. A program variable coded in an Embedded SQL statement is referred to as? Ho st Variable 597.579. 16 21 Character *OPCODE Operation code The first five posi 22 29 Character *ROUTINE First 8 characters of the procedure 30 37 Character RPG IV source listing line number 667. *PSSR BEGSR . What is the length of the variable in the given example? DCL VAR (&Name) TY PE (*Char)? Default 32 & for Decimal 15. Update & Delete. Join Logical File displays data from how many files? 2 or more PF s 581. What is the values SQLCOD when there is an error in fetching the records sp ecified in the select statement? -ve value 592. Which are the Query selection criteria. To add a file to the File Selection option of a Query. ENDSR 669. What does DFU program you to do on a record? Insert. 10 10 Character End of file (1 = end of file) 11 15 Zoned dec *STATUS Status code. How many triggers can be associated with a file? 6(Maximum) 589. Update Delete & File E nquiry. 588.e. Why is the Declare cursor statement is used for? To define & name the curso r & specify rows to be fetched. 668. A Query can be run in which mode? Batch & Interactive 585. What is Procedure ? A procedure is the set of self contained high level language statements that can perform a particular task and then returns to a caller. Command to create FRF? CRTPF 580. Which of the CL command can be used to determine which logical files are de pendent on a specific file? DSPDBR 598. What do we can do with the Embedded SQL statements? We can Insert/Update/De lete records. DLCOBJ command is mandatory for removing lock on any object? False 594. 590. fetch values from records into variables. Which CL command can be used at program execution to redirect the file name d in an RPG program? OVRDBF 600. What is a Journal? A Journal is an object used primarily to record changes to data in a PF. 586. fetch records. which can be given in a Query? LIST 583.5 1 8 Character *FILE The first 8 characters of the file 9 9 Character Open indication (1 = open). 596.

And PR. A service program differs from a program in two ways: It does not contain a program entry procedure. 675. 677. What is the structure of Service Program ? What is signature ? ????????????????????????????? 676. 678. A service program is bound into a program or other service programs using bindin g by reference. what w ill happen ? Program crashes. as in case of *ISO format it required fields of 4. it should end with C RETURN PARMA + PARMB 671. the procedure should end with C PROC1 E In returnable procedure.2. D PROC1 PR Then define Procedure with Begin/End Procedure Name Begin/End P PROC1 B Export Then define Procedure Interface along with parameter and PI D PROC1 PI 5 0 D PARMA 5 0 D PARMB 5 0 Define all the parameters as a variable to the procedure D PARMA S 5 0 D PARMB S 5 0 In not returnable procedure.2. What is the disadvantage of using Global variable? We can not trace out at which point the value of variable is changed. This means that you cannot call a service program using the CALL operation. 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 runnable procedures and available data item s easily accessible by other ILE programs. If we tried to move year part of *ISO date into a field of length 3. How to avoid using indicators in ILE ? . D PROC1 PI 5 0 D PARMA 5 0 D PARMB 5 0 672. 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. 673.670. D PROC1 PR Procedure Interface It is section where we define all the parameter which are receiving or returning some values. What is Procedure Prototype and Procedure Interface. What is *ISO date format? YYYY-MM-DD for other formats refer to IBM manual or ERIS document. 674. How to define a procedure ? First we have define Procedure Prototype along with all parameter. In many respects it is similar to a s ubroutine library and procedure library.

EDTCD E(Z) for suppressing the leading zero Y for date field. (PGMQ) and Record format is associated to a line number. 682. 680. And EDTCDE has some Codes pre-defined for example.By using the standard Built In Expressions like %FOUND. To overcome above disadvantage validations is done within program and user frien dly/defined message is displayed. What are the important factors in Error message subfile ? We must define error message record format (SFLMSG). EDTWRD can be used to define user defined formatting for a fields.%EOF. here we need to define a field to get row an d column. Disadvantage of using Validity Check keyword? How to overcome these disadva ntages ? If invalid values are entered. System defined message is displayed which may not be user friendly. NOT %BOF etc. That is. The option filed is displayed in reverse image. NOT %EOF. How to validate input values in Display file ? with the help of Validity check key words VALUE.(H) 687. Stored procedures can be used in both distributed and non-distributed applicaitons. Length of variable should be 5. 685. EDTCDE cannot be appl ied to Character filed. %BOF. How To get the cursor position? With the help of RTNCSRLOC keyword. OVERLAY It allows a record format to be displayed on screen retaining the previous displ ayed record formats. Keyboard is locked. 686. 683. What key word is used when screen is re-display? RSTDSP is a parameter to be specified at compile time for display file. Procedures in SQL pr ovide the same benefits as procedures in a hot language.0 fixed We can specify *FILED for filed *REC for Record on which a key is pressed. 681. While command function key passes indicator st atus as well as a data from screen to program. RANGE. we have to reset it. And a Program Queue. How to define to define a Hidden filed in DSPF ? Define a filed in a DSPF of use HIDDEN. Command Attention key and Command Function Key ? With the help of Command attention key we can pass only the indicator status to program not the data from screen. syntax is as below EXEC SQL DELCARE P1 PROCEDURE (:PARM1 INOUT CHAR(10)) . COMP 684. EDTCDE & EDTWRD EDTCDE & EDTWRD are key words used for formatting purpose. A stored procedure is a program that can be called to perform operations that ca n include both host language statements and SQL statements. a common piece of code need only be written and maintained once and can be called from several programs. It is defined using DECLARE PROCEDURE statement. SQL / 400 Structured Query Language 688. What is the stored procedure and how do you define a stored procedure. Display / Printer File 679.

(EXTERNAL NAME MYLIB/PROC1 LANGUAGE RPGLE SIMPLE CALL WITH NULLS). Using Single statement. OUT . CL. FILE2 WHERE FILE1. 689. C. 691.FLD1 = FILE2. ETC. DELETE RULE. Type of constraints A referential constraint is being added *REFCST *UNQCST A unique constraint is being added. How do you achieve referential integrity? By adding Referential Integrity Constraints to a Physical file or Logical file.FLD1 FROM FILE2) 690. FOREGIN KEY. Language can be RPGLE. Deleting a record in a parent file causes match ing records in the dependent file to be deleted when data for a non-null parent key matches data for a foreign key. If we want to have a look where the stored procedure. END-SQL We can have parameters as IN .FLD1 Using Nested Select statement SELECT * FROM FILE1 WHERE FILE1. e tc. *CASCADE The cascade delete rule is used. Type of Update rule (UPDRULE) *NOACTION No Action *RESTRICT Updating a y does not Updating a ey matches record in a parent file is permitted if data for a non-null parent ke match data for a foreign key. *PRIKEY A primary key constraint is being added *CHKCST A check constraint is being added Type of Delete rule (DLTRULE) *NOACTION 1. Deleting a record in parent file is permitted (not restricted) if data for a non-null parent key does not match data for a foreign key. SELECT * FROM FILE1. *RESTRICT Deleting a record in a parent file is permitted if data for a non-null parent ke y does not match data for a foreign key.FLD1 EQ (SELECT FILE2. Constraints like PRIMARY KEY. record in a parent file is restricted if data for a non-null parent k data for a foreign key. Select * from ????????????????????? . we can have a look through SQL. INOUT type.. Commands are ADDPFCST for Physical file and ADDLFCST for Logical file. Where Stored procedure lies in the system. Writing an SQL statement from selecting records from TWO files using single statement and Nested select statement. Deleting a record in a parent file is restricted if data for a non-null parent k ey matches data for a foreign key. UPDATE RULE. MYLIB/PROC1 this PROC1 is a program written and compiled separately and it is of language which you are specifying in section LANGUAGE. Deleting a record in a parent file is restricted (does not occur) if data for a non-null parent key matches data for a foreign key.

PREV. When the FETCH is issued . Can we have records (with fields from more than one file) from multiple fil es and Nested / sub query in SQL ? Yes.FLD1 IN (SELEC T FILE2. LAST. 693. Difference between View and Index ? View will not any data. It only shows a data from table while Index has a Index ing Data for a sequence on which Index is created. the cursor is positioned to the row of the table that is specified by the POSITION option. 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. Cursor defined with SCROLL key word Rows of cursor can 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 Cursor Declare Cursor Open Cursor Fetch record Processing Close Cursor 695. To use serial cursor we have to re-issue OPEN Scrollable Cursor which is defined with SCROLL key word.. (FIRST.FLD1 FROM FILE2) 694. View is similar to Logical fi le without having Key and Index is similar to Logical File having Key (as keyed logical file has access path data) Table is similar to PF. NEXT. RELATIVE) . Different 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 table.692.

Sign up to vote on this title
UsefulNot useful