AS 400 FAQ'S

March 25, 2018 | Author: Chetan Challa | Category: Ibm System I, C (Programming Language), File Format, Library (Computing), Computer File


Comments



Description

AS\400 Interview Questions 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" in the following calculation specification? C KEY CHAIN FILE N 99 If you specify 'N' in 53rd position, the record will not be locked if you try to read 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 records 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 causing 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 ad d 1 to it. Through program we can 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 an d QRCVDTAQ along with parameters like data queue name, library in which data que ue exists, variable to store the number of characters to be sent, variable to st ore the information to be sent. We can send the same data queue to the many prog rams. 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 To extract the 15. Define the To concatenate 16. Define the purpose of the %SST function? information from the specified string. purpose of the *CAT function? the two strings into a one string. 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 repeatedly. 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 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 no t 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 existing 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 u pdate the data area value through the program. The letter "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 operation 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 purpose 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. b. c. d. e. READ To read the records sequentially. READE To read the equal 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 written 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, the control transfers after ENDDO sta tement. Otherwise, it reads the records from the data base file based on indicat or specified on HI position. If the specified indicator on LO position 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? SFLSIZ > SFLPAG. 32. When would you use or not use this approach? It is the most desirable method in building a real time applications. We can use at all the times. 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 ended abnormally. With the help of File Information Data Structure we can handle record lock situation. Generally it will happen, when th e same file of type " U" used in different programs. 34. 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 file. This indicator automatically set on whenever overflow occurs on a type of page. 35. How would you design the process for a nightly, high volume check producing process that needs to select only records that are flagged to be processed? With the help of OPNQRYF Clp command, we can select the records from the data ba se file. The process involves following steps: Steps: 1. OVRDBF with SHARE (*YES) 2. OPNQRYF 3. CALL the program 4. DLTOVR 5. CLOF 36. How would you join 3 separate fields, a first name, middle initial and last name together as 1 field with proper spacing? You can describe in either RPG and/or RPG ILE (Integrated Language Environment) MOVE 'Dr. ' FNAME 3 MOVE 'JOHN' MNAME 4 MOVE 'WATSON' LNAME 6 FNAME CAT MNAME: 1 VAR1 8 VAR1 CAT LNAME:1 VAR2 15 DSPLY VAR2 MOVE *ON *INLR 37. When PGMA calls PGMB for the first time PGMB executes the *INZSR. PGMB uses the RETRN operation to return to PGMA. When PGMA call PGMB the second time is th e *INZSR executed? If you specify RETRN in called program, the *INZSR will not execute again. 38. Show 2 ways to convert a date from YYMMDD to MMDDYY (MULT operation not acceptable) 1) CVTDAT DATE() RTNVAR( ) FROMFMT( ) TOFMT( ) Source code is required to convert from one date format to another date format. The source code in CLP is given below: Describe the function of SETGT operation in RPG language? The SETGT operation positions a file at the next record with a key or relative record number that is greater than key or relative record number specified in factor 1. What is the function of CRTDUPOBJ command? To create the replica from the original object. What are different types of Substems? QBATCH. What is the function of CPYF command? To copy the data from the one file to another. QSPL. Describe the function of SETLL operation in RPG language? The SETLL operation positions a file at the next record with a key or relative record number that is greater than or equal to key or relative record number specified in factor1. * The job is created (job name is assigned. 48. Tax = 20% c. QBASE. Define Subsystem? Subsystem is nothing but it provides specialized environment to complete the execution of jobs. 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. Define a Batch Job? * A user request the job. 47. the indicator specified in EQ comes *ON. QINTER. Define a Output Queue? Output queues are queues of jobs waiting to be printed. 41. What is the function of CPYSPLF command? It copies the spooled file to the data base file.Sale = 1.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. What is the purpose of Level Check parameter in a Physical file? Specifies whether the level identifiers of the record formats in the physical fi le are checked when the file is opened by the program. Determine the value of the result field a. QCMN. 42. 46. 50. 51. 44. job attributes are allocated) * The job is placed on a job queue . Cost = $110. 49. QCTL. 0$ 40. Define a Job Queue? Job queues are queues of batch jobs waiting to be processed. MarkUp= 05% d. 43. 00 b. 45. Sale = 10% C Eval TotalCost = ((Cost * MarkUp) * Tax)) . 57. 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. keywords including *FILE. What is the CLP command to access a Query/400? WRKQRY 54. Specifically. 52. Describe about Query/400? Query/400 is a licensed program that uses a query to analyze and select the information contained in the data base files and create a query report. In the data area data structure. So you don't have to create permanent files for every combination of attributes your application might need. *RECORD. *STATUS. * Output generated by the batch job is placed on an output queue. 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 provide the previously named information. *OPCODE. letter "U" must be entered to define t he data structure as a data area data structure. Purpose of Overrides? The basic purpose of Overrides is to temporarily change the attributes of a file . 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. * The spool sub system prints the output on the output queue. Exception errors may be controlled by testing for an error code in the *STATUS field which is included in a file information data structure. its data is implicitly retrieved for processing and written back at the end of t he program. * File information data structure A file information data structure provides exception/error information that may be occurred when processing a file during program execution. Overrides gives you the flexibility to use existing model files and dynamically change their attributes. 55. A query report can be: * displayed on a workstation (screen) * printed * stored in another database file. * Program status data structure . 56.* The sub system QBATCH takes the job from job queue and starts it. 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. 53. Program status data structure however identity exception/errors that are generat ed in the program by RPG/400 operations and not by a file. 60. . Logical file contains more than one record format. What is the difference between regular logical file and join logical file? Regular logical file contains more than one record format. Why would you prefer OPNQRYF than logical file? The main difference is : Logical file creates permanent object on the system. What is the difference between access path and Dynamic select? Dynamic select occurs whenever the program reads file. 66. which contains field definitions and description s. Record format name in regular logical file should be same based on the physical file. 61. 64. Record format name in join logical file should be different. creating and using a logical file will allow an application to perform faster than using an open query file.*STATUS. 62. keyword? in a logical file. What is field reference file? Field reference file is a file. Because access path maintenance performed on the file. 63. and it doesn't have member. the system doesn't perform Then on the Select/Omit criteria. The purpose of each one is described belo records will retrieved in first in first out order. since the access path will not have to be rebuilt every time the file is open. But access path occurs before the file is read (but not necessarily). Through logical file we can made changes in physical file. *ROUTINE. FCFO? at file level. records will retrieved in first changed first out order. If you specify this in a fi record selection until the program reads file. Logical file doesn't contains data but it provides view from the physical file. records will retrieved in last in first out order. it selects the records from the specified file 59. Join logical file contains only one record format. Since access paths created by open query files are temporary. What the purpose of These keywords are used w: FIFO: The duplicate key LIFO: The duplicate key FCFO: The duplicate key the keywords FIFO. 65. LIFO. When would you prefer logical file than OPNQRYF? The physical file you are working with very large. Physical contains data derived by the field referenc e file. Four keywords . OPNQRYF creates temporary access path. What is the purpose of DYNSLT This is a file level keyword used le level. Physical file contains actual data. Through join logical file we can't made changes in physical file. *PROGRAM. Note that any code great er than 00099 is flagged as an exception/error. applications that use an access path frequently will be more efficient using a logical file. Distinguish between logical file and physical file? Physical file contains only one record format. What is the necessary keyword used in a physical file to refer field . *PARMS are supported by a program status data structure. 58. th e internal indicator MDT (modified data tag) is automatically set off by the syste m. What are the different types of access paths maintained on the file? Immediate: All the access paths (open and close) associated with a file will be updated whenever changes made to a file. What is the purpose of CHGPF (Change physical file) command? CHGPF command is used to change the attributes of a physical file.only open access paths will update whenever changes made to the file. 68. Delay : Rebuild will not takes place. Hence using RGZPFM command we can compress the deleted records space. . . Hence you should be explicitly set on the MDT by SFLNXTCHG keyword. Array: Array can be searched randomly.definitions from the field reference file? REF which is a file level keyword is necessary to define at file level in a physical file. * If the factor 1 is *NAMVAR then DEFN opcodes defines the field as a data area. e. Rebuild takes place whenever remaining access paths will be open. What is message 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. Because internal indicator MDT would be off . Array: We can access all the elements in array by specifying the array name. 70. Table: Only one table element can be accessed at a time. The syntax is as follows: REF(library name/name of the field reference file) 67. In the other hand. 74. What is the difference between production library and test library ? In debug mode. If you again perform read on the same records. Rebuild. What is the purpose of SFLNXTCHG keyword in a subfile? Which is a subfile record format keyword. 75. What is the difference between Array and Table? Array: Array is stored any where in the body of the input records. 71. Attributes li ke * Maximum number of members * Member size * Level check enforced * Open data path is shared 69. 73. 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 new field based on the attributes old field. Table: Table is stored at the begining of the input records. records won't be read. How can you identify End of file in CLP program? With the help of MONMSG MSGID(CPF0864) we can identify end of file in clp progra m. the files exists in test library allowed to update. If you perform read on the subfile. Table: Table can be searched consecutively. still the space used by the deleted records not used by the other purpose. 72. the files exists in production library not allowed to update. What is the purpose of reorganizing the physical file i. RGZPFM? Even if you delete the records in a physical file through the program. What are necessary keywords to code message subfile? SFLMSGRCD. all the files used in program will remain open. the MONMSG command executes with the help of message identifier.74 in a file description specification indicating that user control on a file. control transfers to statement below ENDDO. When will you use OPEN and CLOSE opcodes in RPG program? If you specify the letter "U" at columns 73 . . If you specify RETRN. In fully procedural file the records will be read and processed in any order. all the files used in program will be closed. 80. Hence we have to explicitl y open and close the file in a program. Define an Interactive Job? * A user requests a job. next we can dynamically create the data area. What is the difference between SETON LR and RETRN? If you specify SETON LR. 85. * Job is created and job name. * The sub system QINTER takes the job from the job queue and starts processing. we can RTVMBRD command. 83. we can find existence of object on the system. 84. * Job is placed on a job queue. How can you check the existence of object in a system? With the help of CHKOBJ clp command.76. How many primary files allowed in a program? Only one primary file is allowed in program. The field definitions and descriptions are defined in side the program in a program described file. What is the purpose of RTVMBRD command? In order to access the information related to member. 78. Th e logic flow is controlled by the opcodes in RPG program. 81. * The output generated by the interactive job is placed on the output queue * The spool sub system QSPL prints the output. What is the difference between externally described file and program describ ed file? The field definitions and descriptions are defined out side of the program in a externally described file. The usage 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) + VALUE('010196') TEXT('The last day that had job acct.+ data extracted') ENDDO RTVDTAARA DTAARA(JBA001DT *ALL) RTNVAR (&FROMDATE) The execution of above steps is listed below: steps 1: First it checks the data area object on the system. How many secondary files allowed in a program? More than one secondary files are allowed in a program. 79. What is difference between fully procedural file and primary file? In primary file the records will be read and processed from begining to end. Thi s order is not changed. SFLMSGKEY. job attributes are assigned. 3. If the data area object found. SFLPGMQ 77. 2: If the data area object not found. 82. without waiting for the next input or output/input operation. What is the maximum number of record formats in DSPF? 1024 (One thousand and twenty four) 92. What is the purpose of OVRDTA (Override Data) keyword? Use this field level keyword with PUTOVR keyword to override the existing the da ta contents of a field already on the display. What is maximum number of Arrays allowed in RPG? 250 (Two hundred and Fifty ) 98. 90. What is the maximum number of files allowed in RPG? 50 (Fifty including eight printer file) 97. SFLDROP: To drop the second line of multiple line subfile. What is the purpose of SFLFOLD and SFLDROP keywords? SFLFOLD: To fold the second line of multiple line subfile. 87. What is the maximum number of parameters allowed in CLP? 43 (Forty three) 95. What is the function of DSPATR (display attributes) keyword? Use this field level keyword in display file to specify one or more display attributes for the field you are defining. and you can specify more than one attribute for th e same keyword. 86. What is the purpose of FRCDTA (Force Data) keyword? Use this record-level keyword to immediately display a record format. What is the maximum number of subroutines allowed in RPG? 254 (Two hundred and fifty four) 96. You can specify the DSPATR keyword mo re than once for the same field. Where can you specify an indicator in LOKUP operation? . What is the maximum number of parameters allowed in RPG? 255 (Two hundred and fifty five) 94. What is the maximum number of fields under a record format of physical file? 8000 (eight thousand) 93. The following are valid attributes: For All Fields Display Attribute Meaning BL Blinking field HI High Intensity RI Reverse Image CS Column separator ND Non Display PC Position cursor UL 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 light pen 89. delete the objects on the system. What is the purpose of PUTOVR (Put with explicit override) keyword? Use this record-level keyword to permit the override of either display file attributes or data contents of specific fields within a record displayed on the work station device. 91. 88.It is always good CLP programming approach to check the object before you rename. 108. What is a composite key? Defining more than one key as a key field in physical file. the join takes place. JOIN. What is a Member? It is a subset of data records of a physical file. Field level. Record level. 102. 107. What is the use of JDFTVAL in join logical file? If you specify JDFTVAL at file level. 114. 110. 109. JREF. 101. What is the difference between Packed decimal and Zoned decimal? Packed decimal : One digit occupies 1 byte. 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. What are the necessary keywords for the Join Logical file? JDFTVAL. JFLD. This is also called as regular logical file. They are File level. 115. O are to defined at key field level. 105. 103. What is default data type for the fields(sub fields) defined in data structures in RPG? Zoned decimal 112. But we have to give record length. What is Join Logical file? Join logical file joins more than one file.In 'EQ' position. Hence we can access records through the key field. . What is the use of UNIQUE keyword and what level it is defined? It will avoid to enter duplicate key values.O are defined and what they will do? S. What is a Logical file? It is nothing but a logical view provided by the physical file. What is default data type (if you define decimals '0') in Physical file? Packed decimal 111. 113. 116. The S/O is allowed in Logical file only. Key field level. How many levels are there in a Physical file? Four levels. Is it possible to create a physical file without DDS? Yes. We have to define it in a file leve l. Zoned decimal : One digit occupies 2 bytes. What is arrival sequence? The records will be accessed the way in which records are added to physical file . 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. With the help of CRTPF we can achieve this. What is a Non-join logical file? It only provides logical view based on the physical file. even the primary file record does not matc h with secondary file record. 99. JFILE. 104. At what level S. What is a Keyed physical file? Defining a field as a key in physical file. 100. What is the necessary keyword for Non-join logical file? PFILE (which is record level keyword) 106. The maximum of number of files allow ed to join is 32 (thirty two). It is meant for group jobs. we can access the data area record in to the program. It is automatically created and deleted by the system.It can be created by user implicitely or explicitly It can be referred by any other jobs. . tape files etc. 121. What is acronym of RPG? Report Program Generator 119. you need to be open and close files explicitly in a RPG program. What is the native language of AS/400? RPG/400 120. 128. 127. What are the different types of Data Areas? The different types of Data Areas are general data area. *Pip Data Area . 129. 124. pip (program initialization parameter data area) data area. What is the maximum number of key fields allowed defining in a physical fil e? 120 118. What are various techniques to pass parameters from one program to another? .It is automatically created and deleted by the system We can access the group data area value through clp. When do you use F-spec. group data area. It is not associated with any library. * In order to define a named data structure as a file information data structure . we can use indicators in RPG.It can not be referred by any other job. printer files. discket files. *Group Data Area . How do you know that records are locked? By using a command WRKOBJLCK. How many specifications are there in RPG/400? What are they? There are seven specifications are exits in RPG/400. local data area. What are the various types of device files? Display files. deleted by the user.It is meant for pre start jobs. They are listed below: * * * * * * * Header Specification File Description specification Extension specification Line counter specification Input specification Calculation specification Output specification 122. How do you read data area in an RPG program? With the help of 'IN' opcode. 123. When do you explicitly open files and close files in an RPG program? If you specify the letter ' U ' at column 73-74. Why RPG/400 is famous? * Easy to code and analyze. It can be created. What is the purpose of Indicators in RPG? In order to control the logic flow. * Supports externally described files. * In order to rename the record format of a database file in a program.117. It can be associated with a library. continuation line ? * In order to refer the named record format as a subfile record format in the program. 126. * Local Data Area . 125. *General Data Area . 135. 138. How many libraries can be there in library list ? Total 40 (15 system and 25 application) 141. What is DDM ? Distribution 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. 206. How are the objects stored on AS/400? All objects are stored on AS/400 in a single level storage. 142. In this method all objects are referenced by one virtual address which is translated in to a physic al address whether it is an auxiliary storage or main memory. CALL. Name few IBM supplied libraries? QGPL. What is Folder? A Folder is a named object that is used as a directory for documents and other folders. 205. What is Spool file. 136. QTEMP. 133. QUSRTOOL. QRPG 139. 0) 134. 0 Release 2. What is term CUA . 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. such as information waiting to be printed. Can error messages as a result of a COMP. RANGE or VALUES keyword be overridden? Yes. What is the version of OS/400 that we have? V4R2 (Version 4. Folders can be filed with in another folder. 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.PLIST. QSYS. CSRLOC gains priority. Which single RPG opcode performs both SETLL and READE? CHAIN 131. What is an Object? An object is any thing that exists in and occupies space in storage and on which operation can be performed. 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. 140. OVRATA keyword (field or record level) can be used to override the existing . through CHKMSGID keyword. What is a Library in AS/400? A library in AS/400 is an object that serve(acts) as a repository for other objects. What the purpose of OVRDTA. TFRCTL 130. 137. SAA? Common User Access System Application Architecture 132. QCBL. Why is it required? A file that holds output data to be processed. Relative Record Number. Explain the purpose of KEEP and ASSUME keywords? KEEP: Keep the display from being deleted when the display file is closed. Subfile Control Record Format. How can a message from a message file appear as a constant on the screen? By using MSGCON (message constant) keyword.display attributes of a field or record already on the display. 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. How will you display a particular page in subfile? Move a valid relative record number (RRN) in the field specified using SFLRCDNBR . 217. 208. What is the maximum number of subfiles that can be specified in a display file. 218. Subfile Record Number. Yes. What is SFLPAG and SFLSIZ ? SFLPAG : it is an attribute which specifies the number of records that can be displayed in a screen. 512 219. Maximum number of subfiles that can Defined in a RPG program for one displa is Maximum number of subfiles that can be active for a single file is? Can more than one subfile record be displayed on one line? by using SFLLIN keyword. 212. 216. 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. and subfile control record forma (SFLCTL). What keyword must be used with PROTECT keyword? OVERLAY 214. y file 24 220. In conjunction with what other keyword must OVRDTA and OVRATA be used? PUTOVR keyword must used. What is the purpose of FRCDTA keyword ? Immediately display a record format without waiting for the next I/O operation. 223. which specifies the number of records to scroll at a time. 211. ASSUME: It is used to specify that the OS/400 program is to assume that this record is already shown on the display when this file is opened. 207. 215. 12 221. How do you specify the number of records to roll in a subfile? Use SFLROLVAL keyword in DDS along with number. Associated Subfile Keywords. 213. Explain the use of DFTWRT display keyword? No records will be displayed until there is any I/O operation. SFLSIZ : it is an attribute which specifies the number of records can be stored in subfile. 209. What are all the contents of subfile? Subfile Record Format. 222. What are the two record formats a subfile contain ? Subfile record forma (SFL). 210. Use Printer or ICF files. 231. 237. 225. TCAT Truncates all trailing blanks in the first character string. What are the different types of variables available in CL? DEC. LGL 229. the Bottom/More message could be displayed at end of screen. 228. 227. 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. CHAR. provides informaion about generating and running programs. Explain the difference between defining Subfile and Message-subfile? Subfile record is defined by SFL keyword. the two character strings are concatenated. then the two character strings are concatenated.keyword in DDS. User message 232. Use the concept of subfile (to display more than one record). What is the use of Header Specification in RPG/400? It identifies by H in column 6. 224. How to trap errors in CL? By using Monitor Message Command (MONMSG) 233. BCAT Truncates all trailing blanks in the first character string. where as Message subfile is defined by SFLMSG keyword. 235. 226. What are the limitations of CL (compare to RPG) ? you can not use CL program to ADD or UPDATE records in database files. How do you pass parameters in CL? Using PARM keyword. When will DUMP and DEBUG opcodes be ignored? If blank is specified in position 15 of H specs. TCAT. Use subroutines. How to toggle between single line and Multi . What is the maximum length of a variable name in CL? Maximum 11 characters (including '&') 234. Use Program described files. BCAT? CAT Concatenate two variables or constants into one continuous string. 230. What are the different types of messages in CL? Immediate message. 236. You cannot declare more than one object (file) in a CL programme. but a single outpu t message subfile is a special type of subfile that is supported well in CL. Specify different indicators used in RPG? Overflow indicators Record Identifying Indicators Field Indicators Resulting Indicators Control Level Indicators . one blank is inserted. Break message. What is difference between CAT. Program message.line display of a particular record in a subfile? Using SFLDROP keyword. What is the use of SFLEND keyword? By specifying this keyword. to describe the files. How many files can be defined in F specs? 50 242. Can a indexed file be accessed in arrival sequence in RPG program? Yes. In which specification the report layout can be defined? O Specification. How do you specify page overflow indicator for printer files in RPG? Specify an indicator in position 33-34 of F specification. When is a TAG statement used in RPG? It is used as Label. to assign the files to specified devices . 252. What is a Primary File? It is used in RPG Program Cycle to automatically read records in a cycle. Can you specify a display file to be used in the following modes Input. What is the length of a variable in RPG? 6 Characters. What opcode could be used to test an alphanumeric field for all numeric values? TESTN 254. 250. 246. What opcode will be used to test the zone of a character field? TESTZ 255. 238. 248. 251. What is the use of E specification in RPG? Extension Specs describes all record address files. 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. 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. 244. Output. 241. 247. Give three main purposes of File specification ? To define files. or Combined modes ? Yes. What does 'SR' in columns 7-8 of C specs mean? Calculation operation is a part of RPG subroutine. 256. 239. . 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 fil e. 257. 253. 245. How to read database records without locking them? Put 'N' in position 53 of C specs. How many printer files can be defined in F specs ? 8243. What is a Program Described file in RPG? The field name and length of the fields are defined with in the RPG program.237. 249. arrays and tables. What are Control level indicators? L1 to L9 used to identify certain fields on control fields and then used to condition which operations are to be processed at detail or total calculation or output time. 240. What does CHECK opcode is used? 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). 262. A file information data structure contains predefined subfields that identify: the name of the file for which the exception/error occurred. the record being processed when the exception/error occurred or the record that caused the exception/error. How can we sort an array? By using SORTA opcode. How do you use exceptional write in C specs? Using EXCPT opcode. What does the opcode FREE do? The FREE operation removes a program from the list of activated programs. Use OPEN and CLOSE opcodes in RPG program to open and close files. 265. 263. ? 255 269. What is the maximum number of elements in an array? 9999 264. It does not close file or unlock data area. *ROUTINE : contains name of routine in which the exception/error occurred *PARMS : contains the number parameters passed to this program from the calling program. frees static storage and ensures program initialization (first cycle processing) the next time program is called. 261. What is the maximum number of times Multiple Occurrences DS can occur in a program? 9999 . Can we define Multi-dimensional arrays in RPG? No. DS is defined as program status DS by an S in position 18 of the DS statement. 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. How do you use commitment control in RPG program ? Using COMIT operation. *STATUS contains status code. What is XFOOT opcode? Adds all the elements in a numeric array. 260. 271. and places the sum in the result field . How can the user implicitly open and close the files in RPG program ? Enter UC in position 71-72 of F specs. What does opcode POST do? Puts information in INFDS.258. 268 How many parameters can be defined in a RPG program. The RPG routine in which the exception/error occurred. 259. 266. 267. XLATE operation translates characters in source string (factor 2 ) to the from a nd to strings (factor 1 ) and put into the result field. The last operation being processed when the exception/error occurred. 270. What is Program Status Data Structure? A Program status DS can defined to make program exception/error information available to an RPG program. 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. The status code. 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 COMIT or ROLBK operation). What are all the compiler directive statements? /TITLE. 280. an RPG/400 program automatically follows a sequence of operations for each record that is processed. A-spec UNIQUE. Source Physical File contains the source for the various objects created. During execution. changing & creating source files. and protocols that will provide a consistent framework across the System/370. What is the function of SEU ? A utility for editing programming language source code. How many libraries can be there in a library list ? Total 40 (15 system and 25 application). where as Logical file serves as a access path to database. . FIFO. 1.272. What is the Function of PDM? Productivity tool for copying. System identifies it in *LIBL. etc. 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. DSPF. writing output (WRITE) ****************************************************************************** 275. 274. 276. DDS . QRPG & QCBL. 281. 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. The built-in program cycle include s the following logical steps. 283. What is FCFO. QUSRTOOL. PFILE. conventions. scanning. /COPY 273. RPG. 279. /SPACE. Logical file can contain more than one record format. QSYS. processing calculations (PROCESS) 3. /EJECT. REFFLD 282. What is the use of SDA ? Screen Design Aid is used to create display files interactively. What is the difference between Physical and Logical files ? Physical file contains data. deleting. 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. PRTF. CLP. AS/400 and PS/2. reading input (READ) 2.Data Description Specification. 277. What is SAA? Systems Application Architecture (SAA) is a collection of selected software interfaces. This file has a specific structure. What is a library in AS/400 ? Library in AS/400 is an object that serves as a repository for other objects. Name few IBM supplied libraries ? GPL. QTEMP. 284. 278. What does the keyword UNIQUE mean ? Records with duplicate key values are not allowed. Moving : '-' & '='. 293. 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. 295. 294. arrays and tables. What is the symbol used for copying & moving new field in SDA? Copying : '-' & '=='.( O ) 301. *TIME. to detect whether field has been changed as a result of user input. 296. What are the different types of specification available in RPG/400 ? Control Spec. '>'. What is RPG ? Report Program Generator.( E ) Line counter Spec. underline and highlight display attributes are active ? The result is same as if you had specified ND. 289. What is the symbol used to get name & length of a field in SDA? '?' . Update is not possible through JLF. 287. 304. 298. Is it possible to join the same file to itself ? Yes. 290. 292. 300. 306. 303. Can it be used for Update ? Logical file that combines more than one physical file. all are Optional. What is keyword PFILE specifies ? PFILE is used define the Physical file being referenced. What is the use of E specification in RPG ? Extension Specs describes all record address files. 288. Can an indexed file be accessed in arrival seQuence in RPG program ? Yes. What is a Join Logical File. Is it necessary to define all formats ? Which are mandatory and which are Optional ? No. What is the symbol used for shifting fields in SDA? '<' . How can a screen field that has changed since the last output operation be detected ? Attach the MDT attribute to the field.( C ) Output Spec. 305.286. How many files can be defined in F specs ? A maximum of 50 files. What does SDA stands for ? Screen Design Aid. 297.( I ) Calculation Spec. What would be the effect on the field where reverse image. In which specification Data Structures can be defined? .( F ) Extension Spec. 291. OVRATA keyword (field or record level) can be used to override the existing display attributes of a field or record already on the display.( L ) Input Spec. *DATE. What keyword must be used with PROTECT keyword ? OVERLAY 299. What is the symbol used for defining a new field in SDA? '+'. 302. In which specification can a report layout be defined ? O Specification. What is Multi-format logical file ? Logical which uses fields from two or more physical files.( H ) File Spec. FORCE. WRITE.I . 311. 316. 12 322. What does opcode POST do ? Puts information in INFDS. 320. 313. Can we define Multi-dimensional arrays in RPG ? No. Execution time array. 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). During input operation which indicator position is seton if there is a reco rd lock? LO indicator position is seton. UPDAT. 318. 309. 319. 308. IFxx. *NAMVAR is used to define variables as data area. How can database records be read without lock ? Put 'N' in position 53 of C specs. 325. 24 321. UNLCK. CHAIN. CHAIN. When is a TAG statement used in RPG ? It is used as a Label. 310. and places the sum in the result field . DELET. CLOSE . 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 file is ___ . READE. SETLL.UPDAT and WRITE 323. The maximum number of subfiles that can be active for a single file is____ . 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. READC. 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. REDPE. and WHxx. NEXT.Spec. Can a single screen format occupy a screen area above and below a subfile format ? Not possible. 312. 317. 314. Can you have multiple key lists for a single file ? Yes. In conjunction with which statements can ORxx and ANDxx conditions be used ? DOUxx. What is XFOOT opcode ? Adds all the elements in a numeric array. What are the different opcodes used for file operation on a subfile in a RP G pgm? READ. 307. Compile time array. 315. READP. What is SFLPAG and SFLSIZ ? . 324. What are the different Opcodes available in RPG for Database access ? READ. What are the different types of arrays available in RPG ? Pre-execution time array. DOWxx. OPEN. What is the difference between *LIKE and *NAMVAR ? *LIKE defines the variables as in database. SETGT. 331. Mandatory keywords of sub file SFL. 328. In many respects it is similar to a subroutine library and procedure library. 332. 327.SFLPAG : it is an attribute which specifies the number of records that can be displayed in a screen.Change Line for Continuation.Change Line for Record. This means that you cannot call a . SFLSIZ : it is an attribute which specifies the number of records can be stored in the subfile. SFLSIZ. What are the three line types in RLU ? Report line.Define Fields.View Fields. VF .Define Constants. How can u check no of records in a file DSPFD 339. What are the three types of keywords associated with printer file ? File level. 330. SD . What are the different commands used in RLU ? DR . And if the indicator is not associated and it is seton it READC reads al l the records from sub-file 337.Space Fields evenly. 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.Centre Fields & SP . 329. Record level & Field level. DF . An MDT is set ON. CLC .Define Record. How do u compile RPGLE program Either thru 15 or crtrpgmod 340. SFLDSP. DC . CLR . 333. A service program differs from a program in two ways: It does not contain a program entry procedure. What is service program? A Service Program is a collection of runnable procedures and available data item s easily accessible by other ILE programs. SFLPAG are the mandatory key words 336. 19. 334. How do you specify the number of records to roll in a subfile ? Use SFLROLVAL keyword in DDS along with the number. How do you combine two record formats in RLU ? Using CLC.New Page. What are different record spacing keywords in RLU ? SKIPA. Difference between SFLRCDNBR and SFLNXTCHG SFLRCDNBR will give the RRN of the First record displayed on the screen at a giv en time. CF .Create Sample Data. SPACEA & SPACEB. What is the function of RLU ? To design & prototype a report. How can see logical file based on which physical file and vice versa DSPDBR 338. which specifies the number o f records to scroll at a time. Filler line & Sample line. 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. NP . If an indicator is associated with SLFNXTCHG and it is SETON then READC will read only the changed record. Whenever a record is changed on display file. 335. What is the command used to invoke RLU ? STRRLU. Is module executable No You need to create an RPG prog to run the module 341. SKIPB. SFLCTL. 326. 358. 352. What does DEFN do? It is used to define a field based on the value specifie d in FACTOR 1. What are DDS required for SUBFILE? SUBFILE DISPLAY (SFLDSP) SUBFILE DISPLAY CONTROL (SFLDSPCTL) SUBFILE CLEAR (SFLCLR) SUBFILE SIZE (SFLSIZE) SUBFILE PAGE (SFLPAGE). 350. 348. What is OPNQRYF. Command associate d 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. How will you search an array? LOKUP 354. MONMSG commands It is Dynamically creation of access path. 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 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 subfile. printer files you can describe in a RPG 50 files and 8 printers 345. 347. if the expression is A = B + C then B and C are from the file while A is defined in OPNQRYF. 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.Compile time gets populated at the time of compilation. 359. What are the uses of FACTOR1. How many files. A service program is bound into a program or other service programs using bindin g by reference 343. What is message file? It is file which contain messages created by the user through which a user can display own message while validating.*PSSR defining it in F spec 346. 355.service program using the CALL operation. How will you add a field to physical file already containing data? With CPY F command and *NOCHK & *DROP 351. What are the different types of arrays? Preruntime gets populated at the ti me input. 357. We can divert the output of command to an OUTFILE. What are two types of record are used in subfile? SUBFILE RECORD FORMAT and SUBFILE CONTROL RECORD FORMAT. It . What is SFLINZ and SFLRNA? SFLINZ stands for subfile initialize. Runtime gets populated at the time execution. How do handle file exception/error *INFDS . 360. It is also used to monito r user message. 349. Distinguish between terminating a program through SETON LR and RETURN? LR closes all the files used in the program and RETURN is used to return the contro l to the parent program. and it can have resultant fields i. How do you set pointers to values 55 or next higher or greater? SETGT. 356. What is LOKUP opcode? Look s for a particular element of an array 344. How will you find a string using PDM? By using FNDSTRPDM. 353.e. The first which have chang ed and made valid and released still displaying in reverse image. How do you display a screen in CL? SNDF. SFLRN A stands for subfile record not active (It means records are there in the subfile but active).initialized all the character field as blanks and numeric fields as zeros. 363. 367. What is maximum size of data area?9999. 385. 371. 381. How many maximum parameters can be passed from on RPG program to another CL program? 40 375. 384. 387. What is a subfile? Subfile is a group of records which can be used for (Displaying. 370. How many levels of security are there on AS/400? There are 10 to 50 level o f security on AS/400. What is maximum size of a subfile?9999. 382. What is the maximum length of an OCCUR?9999. 365. 369. 366. 373. If you validate a record in subfile on some conditi on all the invalid records can display in reverse image. 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). How to translate field values form lower case to Upper case? By using opcod e XLATE. How many maximum printer files can be used in a single RPG program? 8 378. How do you write and read a value (similarly as EXFMT of RPG) using a displ ay file in CL? SNDRCVF. 379. How to check end of file in CL? Monitor the message ID (CPF0864). How to fire a JOB? SBMJOB. What is QCMDEXC? It is used to execute a single CL command within the RPG program. Modifying the existing record. How you will know whether you are in SFLDROP or SFLFOLD mode? Bu using the keyword SFLMODE. How you will find an error which is not in the first page of the subfile without using ROLLDOWN key? By using keyword SFLRCDNBR. Why do we use READC? What is SFLNXTCHG? READC is to read those records whic h have changed in the subfile. Can you update a file in CL? NO. How do you read changed records backward in subfile? NOT POSSIBLE. What opcode is used for submit job? Why it is used? SBMJOB opcode is used a nd it is used for background processing. Adding new record. How many maximum arrays can be used in a single RPG program? 200. 383. 376. 380. Can you add a record to a physical file through CL? NO 386. The records have read even it has not been changed due to SFLNXTCHG. Can you display a empty subfile? Yes by using the keyword SFLINZ and SFLRNA . 364. How many maximum loops can be used in a single RPG program? 100 377. How you get the relative record in a subfile in which cursor is located? By using the keyword SFLCUSRRN (Subfile cursor relative record number). and Deleting the existing records). How do you monitor message in CL? By using monitor message ID: (MONMSG MSGI D . 368. What are the maximum parameters can be passed from one RPG program to anoth er RPG program? 255 374. 361. 372. 362. SFLSIZ. 406. 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. While designing the screen using SDA. if user is designing a report using RLU? FALS E . 413. 391. All the fields and parameters in the memory will become blank. From work with member using PDM screen you have to modify existing member using SDA. 396. 397. 414. Write system defined function used to place system name on the screen? *SYSNAME 404. 392. 395. user wants to add record level keywor d then which function key should be pressed? F18. 398. How to see the CPU usage? WRKACTJOB or WRKSYSSTS 399. SFLCTL. Which function key should be pressed to watch all strings defined on the SD A screen? F20 401. Field level. While designing the screen user wants to add file level keywords. Maximum report length is 132. What is *PSSR? It is a system subroutine which is executed by default when any error occurs in a program. Difference between WRKUSRJOB and WRKACTJOB? All the jobs in WRKUSRJOB are seen including Active jobs where as in WRKACTJOB only active jobs are seen. Write down any two mandatory keywords used when defining a subfile? SFLDSP. SFLPAG. Except report design what else can be done by O spec? We can write a Physic al File from O spec. Record level. 415. 412. 410. What are the three levels of SDA? File level. which option do you select? 17 403. 409. F3 function key is kept common for all record formats. RLU: If user wants to define new numeric field on record format then which line command will be used? VF. 394. What is difference between SKIPB (2) & SPACEB (2). 390. While designing the report using RLU. On which level should it be defined? File Level 405. How do you shutdown your IBM server? PWRDWNSYS. If your workstation does not show login screen what might be the problem? Problem with some subsystem. SFLRCDNBR is a FIELD LEVEL keyword 408. Which Function key should be pressed to define hidden field while you are working with SDA? F4 400. 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. If user wants to change the length of the numeric field defined in report then which combination of keys will be used? F23 & F10.(CPF0000) 388. If user wants to add one field on the report then which function key should be pressed? F11. 389. There are multiple jobs for printing in job queue and you want to print a important document then what will you do? Change the priority or change the job queue name. 407. which function key should be pressed to get the field from the field reference file? F10 402. SFLDSPCTL. While designing the screen. then whic h function key should be pressed? F14. If user wants to center the company name on his report then which line command will be used? CF. Why do we define MOVE *ON *INLR? It frees the memory. 393. What is the full for of CA and CF? Command Attention and Command Function. 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. What is Library? A library is a system object that serves as a directory to other objects or collection of object 424. What is the format of As/400 Commands? Verb Object Qualifier Verb: . What is externally described file? A file. 423. which contain data. 437. RLU: Which field level keyword should be used to change any numeric field o f length 8 to 99. 427. Using Query. Difference between Source Physical File & Physical File? Source Physical Fi le contains members who contain source statements & Physical File contains members. In which Specs can PF be made internally? In I Specs. How many types of display are available on As/400 for user interaction? 4 Types they are Entry. 421. Type of Source File & Physical File? Source File: .on which action is performed Qualifier: . 439.identifies your job 431. 426.*PF/SRC Physical File: *PF/DTA 428. ) 418. What is the command to know key fields of file? DSPFD (F4) *ACCPTH(Access Path). Types of Libraries on As/400? There are 3 types of libraries on As/400 they are System (*sys). 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. with the PF s joined by a common key value. 433. Menu.action Object: . 443. Which path a good programmer should use? Unqualified path. What is the command to know how many LF are related to a PF? DSPDBR (Displa y Database Relationship) 438. What are the basic features of SEU? Prompt depending upon type. Using DFU. Objects. 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. Printer file & Display file? *File 442. Can a Join Logical File be updated? No. 435. 434. What is the object type of PF. . 440. 441. 444. Which is the Primary Editor of As/400? Source Entry Utility (SEU). What is Logical File? A Logical file is an Access path to the Physical File . 420. 425. is called as external described file. Information & List Display. 436. What s the use of STRPDM? To work with Libraries. 430. Members & User Options. 416. 422. shows right . SEU shows prompt/syntax checking according to MEMBER TYPE. What is the difference between normal UPDDTA to PF and updating using DFU program? Both are same only difference is DFU allows you to add or change select ed fields. which is created externally & described in the program. User (*test) & Product (*prod). SPACE and SKIP are FIELD & RECORD LEVEL keywords. 432. TRUE.99. To change constant field defined on RLU screen which field level keyword should be used? DFT 417.(378 Max). LF. files or other As/400 objects. 429.9999 format? EDTWRD ( . It is available for read access. 419. How can you specify no duplicate key? By defining the unique key. user will be able to___________ from Physical File? Add/Update/Selected or all fields. What is Library List? A job s library list defines the path of libraries that the job follows when trying to locate programs. 462. Difference between skip before & space before? Skip before leaves the specified no. EXCPT & WRITE. What is the syntax for PLIST? *ENTRY PLIST PARM 461. runs & continues to execute instructions without human intervention or control while Interactive job are user driven. CL.*BLANK. What is CAB? It compares Factor1 with Factor2 & if condition is true. of lines moving to the next page while Space before leaves the specified no. 456.It does not retains the value into the buffer memory. The label specified must appear as the Factor1 of a TAG operation somewhere in the program. KFLD. 458. What is RPG Fixed Logic Cycle? A logic the compiler supplies is called RPG Fixed Logic Cycle. Difference between Interactive & Batch Job? Batch job begins. it is a system-defined subroutine it is executed automatically. C & O. 450. 471. *OFF. What are the different methods to access SEU? Use the Start Source Entry Utility command (STRSEU) Option 8 from STRPGMMNU Through Program Development Manager (PDM) 446. contr ol is transferred to label designated in the result field. 454. Which are the member types which SEU supports? RPG. What are indicators? Indicators are inbuilt class of variables for RPG. 453. What does LOKUP does in Tables & Arrays? The LOKUP opcode searches the Factor1 entry in table or array. 448. LE & EQ.hand side date & left hand side the line number. In which Specs Arrays. File Access Opcodes? READ. READP. In O Specs what is the opcode for write? EXCPT. LF. 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. L. 468. *LOVAL. PF. 447. Tables & Constants are defined? In I Specs. 449. KLIST. F. When you are defining a flat file in your program in F Specs which format will you specify? Flat File: . E. Do we have to Execute the *INZSR compulsory? No. *ON & *ALL.It retains the value into the buffer memory. SETGT. 466. LT.E (Externally Described) 457. What is a Spool File? Printed output items placed in an output queue are known as spooled files. of lines on that page. How does the RUNQRY show the output? RUNQRY shows the output always in RRN (Relative Record Number) & not in keyed sequence. How many printer files maximum can be used in single RPG program? 8 because of the overflow indicators OA-OG & OV. Types of Tables in RPG? There are 2 types of tables in RPG they are: Compile Time Tables Pre-Runtime Tables 469. 467. 445. *BLANKS. READE. 470. GE. 455. 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. CF: . . Difference between CA & CF? CA: . 464. How many Specs are there in RPG & Which are they? There are 7 Specs in RPG they are H. Difference between GOTO & EXSR? EXSR is a conditional branching while a GOT O is an unconditional branching. SETLL. What does the OVRDBF command do? It overrides the PF temporarily for a job. *ZEROS. What does EXFMT does? Write & Read. 452. *HIVAL. 460. I. 463. PRTF & DSPF .F (Fixed Length) Other File: . Which are the Relational Operators in RPG? GT. Which indicator is used for Read? EQ (Equal to) 459. READPE CHAIN. 451. Which are the figurative constants used in RPG? *ZERO. 472. 465. How can we know the CPU utilization of the server? WRKACTJOB (Work with active job) WRKSYSSTS (Work with system status) 485. 493. Grouping non-contiguous data in a contiguous format. Maximum number of Records in Display File? 1024 476. User Defined Data Structure. Difference between CALL & SBMJOB? CALL performs interactively job while SBMJOB performs batch job.473. c. 482. Defining an area of storage in more than 1 format. 479. 478. Program Status Data Structure. Join Logical Files have alway s one record format. What is the command to shutdown the As/400 Server? PWRDWNSYS & Parameter *IMMED. Types of Object Locks & what they do? There are mainly 3 types of locks the y are as follow: . What is the error if we don t get login screen? There is some problem with subsystem. 488. Use of Data Structures? Dividing a field into sub fields. How many types of objects are there on As/400? 80 489. Message Queue. Which are the libraries (system) always present in the library list? QTEMP & QGPL 486. Menu &Program. What is a trigger? A trigger is an action that automatically occurs wheneve r a change Is made to a physical file. How to run other job when one job is active? Change the priority or rename the job. 498. 484. e. Date Area Data Structure. Can the objects stored in the product library be modified? No. *SHRUP D : All jobs can read/update the object. What is Subfile? A Subfile is a temporary area in memory which records may written to & read from a display file device. Which is the subsystem that is always on till the main power switch is off? QCTL 483. File. Library. What is a Join Logical File? A Join Logical File combines information from two or more physical files into one record format. Some of the object types on which locks can be allocated? Data Area. 477. organization & modification of a database & access to the date stored within it. 492.*EXCL : Only the routing step holding the lock can use the obje ct *EXCLRD : Routing step can read/update the file other jobs can only read. Changing the format of a field. How many triggers can be associated with a single PF? 6 (max) . 475. Which users are allowed to manipulate system libraries? QSECOFR & QSYSOPR 487. Multiple Occurrence Data Structure. 481. What is the opcode to release all the locks on a particular PF? UNLCK 497. Types of Data Structures? a. File Information Data Structure. b. 480. d. 474. How can we run a Batch Job? SBMJOB Command. 494. How is data stored in PF s? In fixed length records. 490. How do you place or remove locks on the objects? *AACOBJ & *DLCOBJ 495. What does VLDCMDKEY means? Valid Command Key. 496. Data Queue. Give an example of DEFN opcode? *LIKE DEFN ENAME $ENAME (Now the $ENAME has all the attributes same like ENAME) 491. What is DBMS? A DBMS is a software system that controls the creation. Does the SETLL & SETGT retrieve the record? No. F is the type of file desg. When a spooled file is created. 512. What is the command to view the library list? DSPLIBL 519. Command to display current library is? DSPCURLIB 528. the data elements must be of same Length and same type. it is placed into an? OUTQUEUE 525. 506. How can we know the triggers associated with the PF? DSPFD with parameter TYPE (*TRG) 500. 510. The members in a PF contain data? (True/False) True 518. Change in the externally described file does not require recompilation of t he program? (True/False) False 527. Can a Subroutine contain another Subroutine? No. What are the 2 types of lines on O Specs? Record Identification Line & Fiel d Identification Line. 516. It provides the interface between outpu t queue s Spooled files & the printer. Library on the bottom of the library list & Current library? Current library . Library QGPL. data elements Must be of same type and same length. it uses the concept of Alternate Table. 514. What is the command to create PF? CRTPF 520.499. Used for externally described files given when file types are? I & U 502. The function key to start SEU session through program development manager i s? F6 522. 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 Seque ne 511. 521. The members in a Source Physical File contain? Source statements for a program. The Qualified name for an object ORDPF residing in a library TRAINING is? TRAINING/ORDPF 515. 505. Which one of the following has the highest priority Library on top of the library list. How can we add & remove trigger to a PF? ADDPFTRG & RMVPFTRG 501. A PF can have how many record formats? Only one 529. To stor e information in multiple columns. they simply position to the record. What is an Array? Array is a collection of data. The LF is associated with how many PF s? At least one PF at a time. 508. The command to display a list of spooled files? WRKSPLF 526. The members in LF contain? Access Path. What is a Run Time Table? Data from a separate disk file is loaded into a table each time the Program runs. What is Alternate Table? RPG tables stores information in 1 column. 517. 507. If the data is likely to change over a period of time & Moreover data is large than which type of table is preferred? Compile Time Table. 524. The Member type for an RPG & CL program which SEU supports is? RPG & CLP 523. 513. What is a table? A table is collection of data elements in one column. What is an Output Queue? They are the holding areas that store printed outp ut generated from Batch programs or Interactive applications. What is a Compile Time Table? We can hard code data within the program is said to be Compile Time Table. What does print writer do? It is a system job that selects files from the output queue & prints Them on a printer. 503. Printed output items placed in an output queue are known as? Spool Files. 509. 504. What is the difference between UPDDTA to PF & updating using DFU? Both are same. 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) skip s 2 lines space before printing. 540. A Join Logical File has how many Record formats? 1 554. If user wants to add one field on the report then which function key is pressed? F11 534. 544. RLU: If user wants to define new numeric field on record format then which line command will be used? VF 550. only difference is DFU program allows you to add & update selected fields. SFLSIZ. Write down mandatory keywords used when defining a subfile? SFL. While designing the screen using SDA. Which function key should be pressed to watch all string defined on SDA screen? F20 542. Which function key should be pressed to define hidden field while you are working with SDA? F4 541.530. While designing the screen user wants to add file level keywords then which function key is pressed? F14 532. Maximum report length is 132. Write system defined function used to place system name on the screen? *SYSNAME 545. How does Union file maintains Record formats? 1 Record format for each PF 556. A Multiple format Logical File is also known as? Union File 555. Update & Select fields 539. SEU shows prompt/syntax checking according to? Member Type 536. SFLCTL & SFLPAG 547. If user wants to center the company name on his report then which command will be used? CF (Center Field) 535. 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. 543. . While designing the report using RLU user wants to add record level keyword s which function key is pressed? F18 533. if user is designing a report using RLU? FALS E (Maximum is 378) 551. To change constant field defined on RLU screen which field level keyword should be used? DFT (Default) 552. What is full form for DDS? Data Description Specification 557. 549. From WRKMBRPDM screen you have to modify existing member-using SDA which option do you select? 17. Using Query it is possible to create level break report? YES 538. SFLDSP. Using DFU user can do which operation? Add. 531. While designing screen F3 function key is kept common for all record format s on which level should it be defined? File level 546. Space & Skip are which level keywords? Field & Record 553. What are members? Members are separate entities within a database file & th ey are components of As/400 object. It is possible to run Query using RUNQRY command? YES 537. which function key should be pressed to get the field from the FRF? F10. Consider the following command: WRKOBJ OBJ (*ALLUSR/DBTMEF) Object DBTMEF i n all libraries except system libraries. 574. What is the use of File Format in RPG? It tells to the program that the records are within the program (F) or outside the program (E). 567. SUBS T & CAT 573. Which are Control Break Logic indicators? L1 L9. What is L Specs for? To tell length of page & number of lines to be printed on a page. Records can be Read/Update/Deleted with which file? Simple Logical File & Physical File. A Query can be run in which mode? Batch & Interactive 585. When are the Referential Constraints executed? Insert. A Query can be displayed without saving it? True 582. 591. What is the values SQLCOD when there is an error in fetching the records . 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 do we can do with the Embedded SQL statements? We can Insert/Update/Delete records. What does DFU program you to do on a record? Insert. 586. Command to create FRF? CRTPF 580. When are the Unique Constraints executed? During Insert. Which are the String Manipulation Opcodes? TESTN. 570. Which are the different File Types in RPG? I (Input). 571. 587. What is the size of the filename in RPG? 8 Characters (Max. CHECKR. divide fields into sub fields & to form a group of fields. fetch values from records into variables. fetch records.558. Join Logical File displays data from how many files? 2 or more PF s 581. U (Update ) & C (Combine). 568. Which type of object is used in DB2/400? *FILE 577. 578. 559. CHECK. What is SQL? SQL is an interface for programming language. *PARM. which purpose is H Specs used? Writing header information. What if RPG. Update Delete & File Enquiry. 576. 566. How many triggers can be associated with a file? 6(Maximum) 589. What are Data Structures? Data Structures define an area of storage & layou t of fields within the defined structure. What is I Specs for? To describe the records within Program described file. when & who invented it? Report Program Generator is IBM introduced a High Level Language in 1960. Which are the Query selection criteria. the function key to be pressed is? F9 584.) 561. An access path may be in which sequence? It can be in Arrival & Keyed sequence 575. For. DB2 is a type of Database? It is an Integrated RDBMS. File level entry for a PF can be? UNIQUE & FIFO 579. 562. 588. 564. 590. How many maximum spaces could be given in O Specs? 3 569. SCAN. Which are the four keywords supported by Program Status Data Structure? *STATUS. 560. currency symbol etc. constants. What are the different File Designation Types in RPG? P (Primary) & F (Full y Procedural) 563. Why is the Declare cursor statement is used for? To define & name the curso r & specify rows to be fetched. What are the different File Format Types in RPG? F (Fixed Length) & E (Externally Described) 565. fields. *ROUTINE & *PROGRAM 572. Update & Delete. O (Output). date separator. To add a file to the File Selection option of a Query. which can be given in a Query? LIST 583. What is the type of the Array in the following code?D Arr S 30A Dim (30) PerRcd (1) CTADTA Compile Time Array 619. OVRPRTF FILE (Output) SPLFNAME (Reports)OVRPRTF FILE (Output) COPIES (3)CALL PGM (Rpg001) Copies = 3 610. Which are the DB2 tools to protect Integrity of the database? Journaling & Commitment Control. What is command to write or update to a database file in CL? No command 605. 616. Command to retrieve attributes of a job? RTVJOBA 611. What is the length of the variable in the given example? DCL VAR (&Name) TY PE (*Char)? Default 32 & for Decimal 15.RPg program EMP001 & EMP002 were both written to process the file. Which of the following CL command us used to display a screen & wait for th e user to press enter or a function key? SNDRCVF 602. A file cannot have more than 1 unique key? False 593. Command in CL to copy a Query to a database file? CPYFRMQRYF 613. Which CL command can be used at program execution to redirect the file name d in an RPG program? OVRDBF 600. Which of the following options describes the result of using the USROPN keyword? This file must be opened with an explicit OPEN operation prior to accessing this file. What is command to convert the date format in CL? CVTDAT 604. the length of the parameter shou ld be? 15. In ord er 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. What is a Journal? A Journal is an object used primarily to record changes to data in a PF. 596. What is the command for retrieving user profile attributes? RTVUSRPRF 606. . What will be the attributes of the output report.5 601.D PGMNAME S 20A Inz ( THX1138 )C CALL PGMNAMEC PARM P1 5 The CALL to the program name stored in the PGMNAME field ends in an error. Given the following code segment. Submitting a job using numeric parameters. 618. Command OPNQRYF stands for? Opens a database file to a set of database records that satisfies a database Query request. What is the command to display the Data Area Name ? DSPDTAARA Name 607. A program variable coded in an Embedded SQL statement is referred to as? Ho st Variable 597. Can you debug RPG III program with STRDBG? YES & Vice versa NO 617. 615.5 609. DLCOBJ command is mandatory for removing lock on any object? False 594. Only 1 file can be declared in CL program? True 612. Which of the CL command can be used to determine which logical files are dependent on a specific file? DSPDBR 598. Command CLOF stands for? Closes the database file. the program is not found. 595. Command OVRDBF stands for? Override (replace) the file named in the program & Override certain parameters of a file that are used by the program. Referential Integrity Embedded SQL & Object/Record Locks.specified in the select statement? -ve value 592. What is the command to submit the Batch Job? SBMJOB 608. EMPCL1 calls the RPG program EMP001 & the calls the RPG progr am EMP002. 614. Which CL command is used to trap error messages during program execution? MONMSG 599. A CL program. Add the following CL statement directly before the call to EMP002 DLTOVR FILE (EMPMAST) 603. 621. & Length of each element = 3A. MOVEA: . Which of the following methods will make externally describe file fields available to a program? A Data Structure definition specification that names the file on the EXTNAME keyword. What does XFOOT. What ILE RPG/400 code procedures the same results as the RPG/400 code shown below?C A Add B Sum1 Sum1 Mult X Rslt Rslt Div Tot Answ C Eval Answ = (A+B)*X/To t 623. the RPGLE code look like this: D $Aprid S Like (Crprid) 627. What is the command invoked when we give option 14 to RPGLE program? CRTBNDRPG 625. How many files can be opened in RPG IV program? No Limit 637. Which will be the output of the following ILE Code?D Answer S TC T 12:00PM ADDDUR 12: *Hours Answer 00. X False 636.620. The keyword used to define number of entries per record for Tables/Arrays i n RPGLE is? PerRcd (n) 628. SETLL. RPGLE supports which calls? Static & Bound 635. For CHAIN. READE. Subprocedures can use RPG cycle? False 634. No of element s = 5. Extended Factor 2 Length of Factor 1 & 2 is increased to 14 as well as Length of OP-CODE is 10 Free format is allowed Built-in-functions are available. . 631. 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. If user wants to retrieve the time in microseconds.Sums the elements of an array SORTA: . if we use STRISDB command for RPGLE program? Error: Progr am type not valid 626.C Movel ABC @Arr. READPE & READE where indicators are given & their success? Opcode Success Indicator CHAIN OFF HI READ. recursive call is not supported. %CHAR 632. SETGT. If we want to define a new variable $Aprid with same attributes as field Crpid. While in I LE RPG it is supported. In RPG we cannot call a program i.e. Which is the Built in function to convert numeric field to Alpha field? %EDITC. what Would be data type of the field? Z 633. %EDITW. In the following code %SUBST is aEval Result = %SUBST (Flda: Str: Len) Buil t in function 622. READP. Which of the following Specs. Is not used in ILE? E Specs. READE. READPE OFF EQ SETLL ON EQ SETGT ON HI 638.Sorts the array in ascending order but if while declaring the array Sequence is defined as D it arranges in descending order. MOVEA & SORTA does? XFOOT: .00 AM 630.Transfers valued from Factor2 to the Result field of the Operation but one of them must be an array 639. The DATFMT keyword allows you to specify which of the following date format ? *USA 624. State whether the following code is correct?@Arr is an array. 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 t o a program. What will happen. SFLDSP. It is always a subset of records from physical file hence the name subfile. SFL and SFLCTL ? There are the two mandatory key words for subfile program /design. And this two are the different parts of sub-file. An MDT is set ON. 641. what is SFLDROP and SFLFOLD These are the two key-words used in sub-file for displaying additional informati on which cannot fit one line. SFLEND are the optional key words used in subfile. What is SFLCSRRRN and SFLRCDNBR ? SFLCSRRRN will give the RRN of the record where the cursor is positioned. For example. 647. Position to particular record? With help of op-code SETLL from RPG/RPGLE. Frees the space and release ODP.9999 record s are written to subfile. If an indicator is associated with SLFNXTCHG and it is SETON then READC will read only the changed record. Here sub file size should9999 or the number of records form PF which ever is less. SFLFOLD will give view in folded form and SFLDROP wil l give view in truncated form. SFL. if SFLSIZ = 10 and SFLPAG = 10. Reading records from a subfile using READC With the help of READC op-code we can read only changed records from subfile. In this case PAGEUP AND PAGEDOWN is taken care by system. 643. SFLCTL. SFLPAG are the mandatory key words. SFLPAG should be less than SFLSIZ Single Page/non-elastic In this case sub file size (SFLSIZ) must be equal to sub file page (SFLPAG). LR indicator and RETURN operation? LR indicator It close all the open files. 644. SFLDSPCTL. it will position the record pointer just before the required record. 650. PLIST and KLIST PLIST is a list of parameter and KLIST is the list of KEY fields. SFLSIZ = 10 and SFLPAG=9. While SFL is used to define Subfile record format while SFLCTL is used to define Subfile Control Record format. 642. 649. SFLRCDNBR will give the RRN of the First record displayed on the screen at a giv en time. What is SFLNXTCHG? Whenever a record is changed on display file. Next READ will read that particular record. then 10 records from file are written to subfile. In ILE EPM (Extended Program Model) is implemented while in RPG OPM (original program model) 640. In this case PAG Expandable/elastic/growing In this case SFLSIZ should be grater at least by 1 than SFLPAG.In case of ILE we have the concept of ACTIVATION GROUP. 645. Required key words for subfile. For example.In which all the records from the Physical file or at max. then 10 records from written the sub file from physical file but only 9 are displayed on screen.(this is applicable to Load all type also). And if the indicator is not associated and it is seton it READC reads al l the records from sub-file 646. 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 . What is sub-file? It is group of records read from or written to display file in a column format. What are the Sub file Types? There are three types of sub file Load All . SFLINZ. SFLSIZ. SFLCLR. 648. Gives the size of the variable or liteeral %PARM Gives the number of parameter passed to parameter %PADDR .Trims the right & left blanks of the string %TRIMR . KEYVALUE in to a two dimensional array.Trims the Left blanks of the string %REPLACE . How will you achieve POSITION TO in Load all subfile? While loading subfile move RRN. what should happen? It should process all the valid options before invalid options encounter. How to define array in D spec. %SUBST .Gives the address of the procedure %ADDR . How will you take care of multiple options in case sub-file? We will have to handle it within the program using a READC in a loop. 652. 653. will options be there on the display / in subfile. What is the operation / op-code to change in file? In RPG/RPGLE with the help of UPDAT / UPDATE op-code.PGUP . 657. In CL/CLLE we can not insert a record into database file. D ARR1 S 1 0 DIM(5) It is a Run time array .Gives address of the variable %TRIM .Replaces the specified number of characters from the specified position. 656. having a LOOKUP into a array we can get a corresponding RRN. %LEN Returns the length of value from a field. %FOUND If record is Found. 651. Different operations on indicator? There are only two operations on indicator those are SETON and SETOFF. 659. 660. How do I insert a record into a database file? In RPG / RPGLE with the help of WRITE op-code. When a k ey value is entered into POSITION TO field. In case of Load all sub-file. How to define a subroutine ? with help of two op-code BEGSR(Begin subroutine) ENDSR (End subroutine) and between these two op-codes write the instruction.Gives number of elements or occurrences %INDEX . The whole construct is defined as subroutine. How to print HEADER if O-specs are used in program ? With the help of op-code EXCEPT. What are the built in function in RPGLE ? %SIZE . D ARR2 S 5 DIM(5) CTDATA PERRCD(1) It is a Compile time array.Change the index of a table or multiple-occurrence data structure. If we type some options on screen out of which some are invalid and pressed enter. %CHAR Converts a Numeric filed to character. 662.command prompt. %EOF End of File.Trims the right blanks of the string %TRIML . 655. Once invalid options is encountered program should stop processing and display error message at the bottom of the scrreen. Assigning RRN value to SFLRCDNBR and then displaying the sub-file. Two way of deleting records from file? one is DELETE and other with the help of O-Specs ADD/DEL specify DEL. 661. It will retain all the options entered in the previous page. 654. if we type options and then PGDN. 658. Yes.gives a sub string from a variable (%SUBST(X:Y:Z) %ELEM . INFSR(*PSSR). 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. How to go to *PSSR ? Whenever an exception/error occurs and *PSSR is declared in F-specs. How to write *PSSR ? It just similar to any other subroutine. What is *PSSR and INFSR? It is an exception/error handling routine which is specified in F-Sepcs for a file. the procedure should end with C PROC1 E In returnable procedure. 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 status code (*STATUS). record already locked.10 Character End of file (1 = end of file) 11 . it is automatically goes to *PSSR 665. 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. . 664. What is INFDS? INFDS is a File Information Data Structure. ENDSR 669. 668. it should end with C RETURN PARMA + PARMB 671. What is Procedure Prototype and Procedure Interface. 10 . If *STATUS = 01218 i.37 Character RPG IV source listing line number 667. 666.D ARR1 S 40 DIM(7) FROMFILE(File name) PERRCD(1) It is Pre Run time array 663. 16 . 670. How to define a procedure ? First we have define Procedure Prototype along with all parameter.e. *PSSR BEGSR .9 Character Open indication (1 = open). Whether the statements specified are executed.15 Zoned dec *STATUS Status code. And PR. Can we call *PSSR if no exception occurs? What happen it is called ? Yes. INFSR is an information subroutine to specify the routine na me in F-specs.8 Character *FILE The first 8 characters of the file 9 . 1 .29 Character *ROUTINE First 8 characters of the procedure 30 .21 Character *OPCODE Operation code The first five posi 22 . A service program is bound into a program or other service programs using bindin g by reference. 673. In many respects it is similar to a subroutine library and procedure library. EDTCDE(Z) for suppressing the leading zero Y for date field. 675. How to avoid using indicators in ILE ? By using the standard Built In Expressions like %FOUND. OVERLAY It allows a record format to be displayed on screen retaining the previous displayed record formats. 677. This means that you cannot call a service program using the CALL operation. If we tried to move year part of *ISO date into a field of length 3. How to validate input values in Display file ? with the help of Validity check key words VALUE. 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 will happen ? Program crashes. 683. What is Service Program? A Service Program is a collection of runnable procedures and available data item s easily accessible by other ILE programs. D PROC1 PR Procedure Interface It is section where we define all the parameter which are receiving or returning some values. A service program differs from a program in two ways: It does not contain a program entry procedure. 674. 681. COMP . 680. NOT %EOF. What is the disadvantage of using Global variable? We can not trace out at which point the value of variable is changed. What key word is used when screen is re-display? RSTDSP is a parameter to be specified at compile time for display file. D PROC1 PI 5 0 D PARMA 5 0 D PARMB 5 0 672.2. RANGE. EDTCDE cannot be applied to Character filed.Procedure Prototype In this section we specify the name of the procedure along with PR. EDTWRD can be used to define user defined formatting for a fields. 682. NOT %BOF etc. %BOF. 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.2. What is *ISO date format? YYYY-MM-DD for other formats refer to IBM manual or ERIS document. 678. EDTCDE & EDTWRD EDTCDE & EDTWRD are key words used for formatting purpose. Display / Printer File 679. as in case of *ISO format it required fields of 4. What is the structure of Service Program ? What is signature? ????????????????????????????? 676. While command function key passes indicator status as well as a data from screen to program.%EOF. And EDTCDE has some Codes pre-defined for example. 686.(H) 687. How to define to define a Hidden filed in DSPF ? Define a filed in a DSPF of use HIDDEN. System defined message is displayed which may not be user friendly. INOUT type. A stored procedure is a program that can be called to perform operations that ca n include both host language statements and SQL statements. SELECT * FROM FILE1. DELETE RULE. How To get the cursor position? With the help of RTNCSRLOC keyword. CL. Keyboard is locked.. UPDATE RULE. Procedures in SQL provide the same benefits as procedures in a hot language. Stored procedures can be used in both distributed and non-distributed applicaitons.FLD1 = FILE2. OUT . It is defined using DECLARE PROCEDURE statement. Length of variable should be 5. Language can be RPGLE.684. (PGMQ) and Record format is associated to a line number. 689. here we need to define a field to get row an d column. etc. END-SQL We can have parameters as IN .FLD1 Using Nested Select statement SELECT * FROM FILE1 WHERE FILE1. How do you achieve referential integrity? By adding Referential Integrity Constraints to a Physical file or Logical file. That is. FILE2 WHERE FILE1. And a Program Queue. Constraints like PRIMARY KEY. Commands are ADDPFCST for Physical file and ADDLFCST for Logical file.0 fixed We can specify *FILED for filed *REC for Record on which a key is pressed. ETC. Using Single statement. 685. a common pie ce of code need only be written and maintained once and can be called from several programs. What is the stored procedure and how do you define a stored procedure.FLD1 FROM FILE2) 690. we have to reset it. To overcome above disadvantage validations is done within program and user friendly/defined message is displayed. syntax is as below EXEC SQL DELCARE P1 PROCEDURE (:PARM1 INOUT CHAR(10)) (EXTERNAL NAME MYLIB/PROC1 LANGUAGE RPGLE SIMPLE CALL WITH NULLS). Disadvantage of using Validity Check keyword? How to overcome these disadvantages ? If invalid values are entered. . C. SQL / 400 Structured Query Language 688. The option filed is displayed in reverse image. FOREGIN KEY. What are the important factors in Error message subfile ? We must define error message record format (SFLMSG).FLD1 EQ (SELECT FILE2. MYLIB/PROC1 this PROC1 is a program written and compiled separately and it is of language which you are specifying in section LANGUAGE. Writing an SQL statement from selecting records from TWO files using single statement and Nested select statement. Type of Update rule (UPDRULE) *NOACTION No Action *RESTRICT Updating 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. .Type of *REFCST *UNQCST *PRIKEY *CHKCST constraints .A unique constraint is being added. Can we have records (with fields from more than one file) from multiple fil es and Nested / sub query in SQL ? Yes. Updating a record in a parent file is restricted if data for a non-null parent k ey matches data for a foreign key. If we want to have a look where the stored procedure. It only shows a data from table while Index has a Indexing Data for a sequence on which Index is created..A check constraint is being added Type of Delete rule (DLTRULE) *NOACTION 1. Select * from????????????????????? 692.A referential constraint is being added . Where Stored procedure lies in the system. *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. *CASCADE The cascade delete rule is used. 691. Difference between View and Index ? View will not any data. View is similar to Logic al file without having Key and Index is similar to Logical File having Key (as keye d logical file has access path data) Table is similar to PF. 693.A primary key constraint is being added . 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. 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. Deleting a record in a parent file is restricted if data for a non-null parent k ey matches data for a foreign key. we can have a look through SQL. we can have record from multiple file with join condition and we also can have nested query or subquery like SELECT * FROM FILE1 WHERE FILE1. Deleting a record in a parent file causes matching records in the dependent file to be deleted when data for a non-null parent key matches data for a foreign key. What is the sequence when using CURSOR? Define Cursor Declare Cursor .FLD1 FROM FILE2) 694.FLD1 IN (SELE CT FILE2. Does Opening of cursor locks records ? Yes.Open Cursor Fetch record Processing Close Cursor 695. And If creati on is outside the called program then we will be available with only one set of output. the cursor is positioned to the row of the table that is specified by the POSITION option. It can contain all types of objects except another object of type *LIB 702. NEXT. RELATIVE) 696. then we can have different set of output depending upon the parameter passed to it. What is Library List? It is sequence of objects of type *LIB. To use serial cursor we have to re-issue OPEN Scrollable Cursor which is defined with SCROLL key word.*ENDMOD (End of Module) by default is *ENDACTGRP 698. 704. from which we would retrieve or save the required object.????????????????? 705. What will happen if we call stored procedure again and again ? It the creation of procedure is included in the called program. Records selected into cursor are locked when the cursor is opened. 703. 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. PREV. 700. 697. When the FETCH is issued . Can we update database file with the help SQL Cursor ? While declaring the cursor if we specify FOR READ then we cannot update but if w e specify FOR UPDATE or nothing (by default is FOR UPDATE) then we can update database file.*NONE (Commitment Control) CLOSQLCR . What is Trigger? Trigger are the programs which are activated upon certain event. LAST. What are the two important parameter while creating a SQLRPGLE program ? 1) CMTCTL . Miscellaneous 701. 699. What is Sub-system in as/400? It is Run-time environment. 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. What is Library? Library is an AS/400 object of type *LIB. What is difference between Interactive and Batch Job ? . ???????????????????/ needs to elaborated more . How to call / invoke the stored procedure ? Using CALL command . (FIRST. AS/400 triggers are file level triggers. which provides all the resources required for the execution of program along with necessary memory space required. A job where user interaction is not required is called a batch job. What is JOBQ and PRINTQ ? Jobs go into the job queue in order to run in a subsystem. Why can't a database file be used in place of data area ? Using database file will reduce the performance of application. 719. What does STRSRVJOB command used for ? It is used to debug the batch programs or debug the interactive program of anoth er job. An object is stored and retrieved via a device-independent addressing mechanism. 707. Which program RPG or CL is efficent to update a transaction onto a database file and why ? CL program cannot update/write onto a data base file and hence. 713. choice is RPG program. 711. 718. It is used in association with OPNQRYF. What is single level storage ? Main storage and disk stroage appears contiguous. What is OVRDBF and where it is used ? OVRDBF is a command to temprorarly over ride the parameters of a Data base file. It is not a job. 706. 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. It is defined using opcode *NAMVAR. How QTEMP is different from other libraries ? It is associated to each job (Other Jobs can't access the other's QTEMP). . 717. to use different file with same record format in a program. OPNQRYF is used for dynamic selection. QTEMP is created when the Job is started and deleted when Job is closed. How many record formats can you have in a Physical & Logical file? Physical file can contain only one record format where as Logical file can have more than one record format. situation where frequency to run the programs is less & very large number of records are present in data base file. 712. What kind of job is it --. 715.you 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. What is library list ? list that indicate libraries used for the process and the order in which it has to be searched. 714.job where user interaction is present is called an interactive job. For example to find an object system will search in the in the ascending order of libraries mention in library list. What is difference between Physical file and Logical File ? Physical file contain data where as logical file serve as access path. 716. The data is read by "IN" and written by "OUT" opcode. 710. What is the difference between OPNQRYF & Logical file ? OPNQRYF is temporary Logical file. Print queue where the printer files (report) reside and wait for their turn to get printed. 708. How to handle run time error in CL Program ? By using command MONMSG with suitable message identifier 709. 729. What is the difference between triggers and referential integrity ? Triggers are programs (which carry out a particular business function) invoked either before or after manipulation of the records in a database. 724. 728. 721. bind module to create program). What is Multi occurence data structure ? It is an array of a Data structure. combining various key fields to make one key field and so on. month and year. 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). What are different types of Arrays and what is the difference between them ? There are 3 types of arrays Compile time. . resource sharing). Can we have a multi record format join and non join logical file based on o ne physical file ? We can only have Join logical file based on one physical file. Various uses are converting character value into numeric. What is difference between ILE RPG and RPG/400 ? Difference is in program development (specification). Pre-run time array gets value from a file at the beginning of a program execution (befor e any statement of a program is executed). Referential integrity maintain the integrity of a database using key fields. splitting date field into day. What is difference between Journaling and commitment control ? Journaling record all transactions and is used for restoring or reverting back t he transactions onto the database file for a particular time span. program creation (create module. Pre-Run time and Run time. Can a file be used under commitment control without being jorunaled ? No 727. program running (activation group. What is difference between Multi record format Join and Non.720. Committment control ensures that a transaction is updated successfully onto the data base (a ll relevant files). 731. 722. Run time array gets value during the program execution. Compile tim e array gets value at the time of compilation of the source of a program.Join logical file ? 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. 723. 730. 725. What is difference between module and program ? Module is a non-runnable object where as program is runnable. Which is the better option to write a transaction (order 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 files is the better option because records can't be written through join logical file. Can a file be journaled without using it under commitment control ? Yes 726. How to handle run time error in RPG Program ? by using indicator on statement. What is SFLROLVAL keyword used It specify the number of records to for ? 3rd. The SETLL operation does not. 741. 734. What is SFLNXTCHG keyword used To read the change records for 2nd. *NAMVAR is used to define variable as Data area. What are different type of Sub files ? There are three types of Subfile (1) Load all Subfile (Page Size =9999) (2) Extendable Sub file (Sub file size > Sub file page). What is difference between keyword SFLCSRRRN & RTNCSRLOC ? RTNCSRLOC returns the location of cursor into the variable (associated with this keyword) and SFLCSRRRN returns the relative record number where the cursor is positioned. What is the difference between SKIPA & SPACEA ? In a printer file the printing control goes to the line (of the page) mention in SKIPB where as it leaves number of lines mention in SPACEB 735.What's the difference between CHAIN and SETLL? Is there a performance advantage? There are two important differences between CHAIN and SETLL. What is the difference between *LIKE and *NAMVAR opcode? *LIKE defines program variable same as that of another pre defined variable. 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 737. 742... The SETLL operation does not apply the lock. The CHAIN operation applies a record lock to files that are open or update. The CHAIN operation copies the record's data to the input buffer for the program . don't specify "K" in F specification in the program for this file. (3) Load by Page (Sub file size = Sub file page) 739. 738. Can an indexed file (File with key fields) be accessed in arrival sequence in an RPG program ? Yes. IBM AS\400 Interview Question . m once. What is difference between Command Function and Command Attention key? Command function key returns variable value along with response indicator (associated with CF key) where as Command attention returns only the response indicator value. 740.732. 733.. subroutine *PSSR 736.times from sub file after reading the for ? roll in a subfile.
Copyright © 2024 DOKUMEN.SITE Inc.