AS/400 interview questions

MBT: 1) Briefly describe the difference of coding SFLSIZE = 11, SFLPAG = 10 and SFLSIZE = 50, SFLPAG = 10. Elastic and Non-elastic subfiles. Non-Elastic subfile : Subfile size = Subfile page Elastic subfile : Subfile size > Subfile page a) If SFLSIZ = 11 & SFLPAG = 11 how should the subfile be controlled. Non-elastic subfile : Here the subfile filling, clearing, page up and page down will have to be controlled through coding. Elastic : Page up and page down is handled by the system.

2) What does READC do? Select __ _1_ _1_ __ Emp Num 01 02 03 04 Emp Name Vishnu Kumar Ibrar Ranjan Neerav

a) Will READC read all the changed records or only the first changed record. b) What will SFLNXTCHG do? READC will read only the 1st changed record SFLNXTCHG keyword stands for Subfile Next Change. It maintains that a record is to be considered a changed record and returned to the program when a READC operation is performed. 3) What does SETLL & SETGT do? No. Name 50 55 58 60 avk cjn erk rod

Record Format Name = EMPREC Key field Name = $KEY Suppose key ($KEY) value is: - 57 HILOEQ a) $KEY SETLLEMPREC 99 b) $KEY SETLLEMPREC 98 c) $KEY SETLLEMPREC 97 Where is the record pointer positioned in the above cases? SETLL: It points to the record with equal or nearest value. SETGT: It points to the record with greater value. a) 99 will be off. It will be on if EOF. b) 98 will be off. It will be on if error. c) 97 will be off. It will be on if equal. In all the above cases the record pointer will be between 55 and 58. Read will fetch values of 58.

Page 1 of 21

4) How will an updated record be reflected in your subfile display? By clearing and filling the subfile I will be able to see the updated records. 6) What are the advantages of subfiles? If user is allowed to change multiple record in the Subfile, will you be able to update these multiple changed records to the PF or you have to Update one by one record. We will have to update record one by one 7) How do you maintain referential integrity in DB2/400? By defining primary key and foreign key using ADDPFCST command. The Add Physical File Constraint (ADDPFCST) command can be used to add constraint relationships to a specified physical file. The three types of constraint relationships that you can add are referential constraints, unique constraints, or a primary key constraint. All constraints are defined at the file level. You can use constraint relationships to define dependencies between files. The relationships that you define are enforced by the system when changes occur to information in the files. When you define constraint relationships you control the referential integrity of the data being processed. A maximum of 300 constraint relationships can be established for a file. However, only one primary key constraint can be established for a file. 8) What is the difference between tables and physical files and CRTPF and CRTTBL? PF: The Create Physical File (CRTPF) command creates a physical file from the information specified on this command and (optionally) from the data description specifications (DDS) contained in a source file. A physical file is a database file that contains data records. The data records are grouped into physical file members and each member has its own access path to the data. Normally, database files have only one member which, by default, is added to the file when the file is created. Table: The Create Table (CRTTBL) command creates a named table. The table can be used for the translation of data that is moved between the system and a device. The table can also be used to specify an alternate collating sequence or to specify field translation functions. 9) What are embedded SQLs? The query, which we use in SQL RPG between EXEC-SQL and END-EXEC, is called embedded SQLs.

Page 2 of 21

Once opened. the file looks like a database file opened using the Open Database File (OPNDBF) command. with selection both • before and after grouping the records. and record format. Without creating an object of LF you cannot view records. and calculate aggregate functions. The Open Query File (OPNQRYF) command opens a file to a set of database records that satisfy a database query request. The logical file does not contain data records. 11) How do you use OVRDBF? The Override with Database File (OVRDBF) command is used to (1)Override (replace) the file named in the program (2) To use specific member of a file (3)Override certain parameters of a file that are used by the program OVRDBF FILE(FILE1) TOFILE(FILE2) SHARE(*YES) 12) Why do you use OVRDBF In OPENQRY? Page 3 of 21 . and each logical file member has its own access path to the data. PF's and QRY files. No object is created. The logical file accesses the data records through one or more logical file members. using the Close File (CLOF) command. A logical file is a database file that describes how data records contained in one or more physical files are presented to a program. • Group records by like values of one or more fields. The join may be either equal or non-equal in nature. and the records in the file are accessed by high-level language programs that share the open data path (ODP). member. The data records are contained in the physical files associated with the logical file. such as minimum field value and • average field value. • Arrange result records by the value of one or more key fields. • Select a subset of the available records. for each group. LF is a logical file whose object is created. Each logical file member describes the data contained in one or more physical file members.10) What is the difference between OPNQRY & LF? Ans: OPNQRY is a CL command which is used to view LF's. and all query resources are deallocated. The path is closed. The data records contained in the physical files are grouped into physical file members. This command is used to do any combination of the following database functions: • Join records from more than one file. • Calculate new field values using numeric and character operations on field values and constants. LF: The Create Logical File (CRTLF) command creates a logical file from the information specified on this command and from the data description specifications (DDS) contained in a source file.

Following error 5092 Factor 2 is not the name of a fully procedural file for operation specified. if this job is a group job. '57'. Types: LDA (Local data area). It maintains that a record is to be considered a changed record and returned to the program when a READC operation is performed. 15) Can you control the open and closing of PFs and LFs inside a RPG program? Yes by mentioning the File Condition as UC (User Control) If UC is Blank The program can use the file. The local data area (*LDA) is a character data area 1024 bytes in length. The add length is 2000 bytes. Page 4 of 21 . If a file is to be opened by the OPEN operation in the calculation specifications 16) Can you read a physical file in CL? Yes using the command RCVF The Receive File (RCVF) command is used in a CL program to receive data from a display device or database file. SETLL: It will just point to a particular record. 57 directly. which satisfies the criteria. To fetch the values of the record we have to use command READ. SETLL points between 56 and 57 and with the next read statement the pointer points to 57th record. You have to declare file first. It is automatically associated with your job and cannot be accessed from another job. if there are 3 records '56'. It is created using the command CRTDTAARA. No. so that the values of the record are available. *GDA (Global Data area). This data area is automatically associated with the group and cannot be accessed from jobs outside the group. *PDA (Program Initialization). E g. In CHAIN command the pointer is on the record. DCLF RCVF FILE (STTEST/EMPSETLL) RCDFMT (EMPREC) 17) Can I chain a primary file and what is the sequence of processing. 18) What is the difference between CHAIN & SETLL CHAIN: Points to a particular record and also reads it. *PDA The program initialization parameter data area is valid only if this is a prestart job. *LDA The local data area is displayed.13) What are the different types of data areas? Data area is an object used to communicate data such as variables values between programs within a job and between jobs. 14) What is SFLNXTCHG? SFLNXTCHG keyword stands for Subfile Next Change. *GDA The group data area is displayed. In SETLL the pointer is above the record satisfying the criteria. UC Type UC if the programmer is to have control of the first open. The length of this character data area is 512 bytes. '58' and 57th record is to be searched: CHAIN points to record no.

For this reason. 11) What are Diff arrays? 1) Compile time arrays: Loaded when the program is compiled. 2) How to define 2 files with the same format? In f spec rename record format 3) What is CL command to Create DTAARA? Ans: CRTDTAARA and press F4. CLOSE etc. 12) How to save the spool file? Page 5 of 21 . OPEN. Level checking occurs on a record-format basis when the file is opened unless you specify LVLCHK (*NO) when you issue a file override command or create a file. which loops at least once and then checks for the condition. 8) What is Level Check? Programs are dependent on receiving. calculation. or output. 10) How to control open & close of file in RPG? There are two opcodes OPEN to open a file and CLOSE to close a File. READC. or PRINTER file is used.SDI: 1) How to define data area Data Structure? IPDS and Enter Press F4 for help Data Struct Name: Type data structure name Option: U Type U if this is a data area data structure. DOU is a Do Until Loop. The RPG compiler always provides the information required by level checking when an externally described DISK. 4) What is CL command to Retrieve DTAARA? Ans: RTVDTAARA 5) What is CL command to Del DTAARA? Ans: RMVDTAARA 6) What is CL command to Lock DTAARA? Ans: Factor1 Operation Factor2 *Lock IN DATA01 (Name of data area) Result 7) What is Diff bet DOW & DOU? Ans: DOW is a Do While Loop which 1st checks for the condition and then enters the loop. Give the data area name and the type (Char. the system provides a level-check function that ensures that the format is the same. READP. the program is notified of the error. If the level-check values do not match. READ. WORKSTN. 2) Runtime Arrays: Loaded when the program is executing. at run time. change. an externally described file whose format agrees with what was copied into the program at compilation time. Dec) and press enter. The default on the create file command is to request level checking. MOVEL. 9) What are Diff Opcodes in RPG? CHAIN. and override file commands. The level-check function can be requested on the create. Z-ADD. 3) Pre runtime arrays: Loaded when the program begins running before any input. MOVE.

If it is.Use WRKSPLF command to see all the spool files. STEP 11. RPG turns on the proper control level indicator and all lower control level indicators except L0. 13) What is RPG cycle? I) Start 1) Perform heading and detail lines 2) Get input record 3) Perform total calculations 4) Perform total output 5) LR On 6) If LR On then end program 7) If LR not On then move fields 8) Perform detail calculations 9) Go to STEP 1.) STEP 5. all records have been processed. then to save a particular spool file use option 2=Change and press F10 and give the parameter ‘Save File’ *YES. If the conditioning indicators are satisfied. RPG performs all detail calculation operations (those not conditioned by control level indicators in columns 7 and 8 of the calculation specifications) on the data from the record read at the beginning of the cycle. STEP 6. STEP 10. If a control break has occurred. RPG determines whether the LR indicator is on. STEP 8. RPG reads a record and turns on the appropriate record identifying indicator. (A control break occurs when the control field of the record just read differs from the control field of the previous record. RPG performs total output operations (those lines having a T in column 15 of the output specifications) according to output specifications. RPG performs total calculation operations (those conditioned by control level indicators in columns 7 and 8 of the calculation specifications) if the appropriate control level indicators are on. RPG makes data from the record read at the beginning of the cycle (step 3) available for use in detail calculation and output operations. STEP 2. RPG goes to step 9. II) RPG PROGRAM CYCLE STEP 1. If this is the first cycle. which is always on. and the program ends. Page 6 of 21 . RPG turns off all control level and record identifying indicators. STEP 4. STEP 9. STEP 7. STEP 3. RPG determines whether a control break occurred. RPG performs the heading or detail output (those lines having an H or D in column 15 of the output specifications).

when no more records are available. It is declared like any other subroutine. 14) What is *INZSR? *INZSR is an Initialization Subroutine. This subroutine will be automatically invoked at the end of the initialization step in the RPG/400 program before IP output. The program performs the total calculations and total output. Long 2. Float 6. the program prints lines conditioned by the 1P (first page) indicator and also performs any heading or detail output operations having no conditioning indicators or all negative conditioning indicators. During the last program cycle. 17) What are the errors you encounter in Compile time arrays? Following errors are encountered: 1. such as PAGE and UDATE. Date Page 7 of 21 . the LR (last record) indicator turns on. defaults to 1 if index is greater than array elements 18) What are the limitations in RPG/400? Ans: 19) What are the datatypes not supported in RPG/400? Following datatypes are not supported in RPG/400 : 1. Index is Invalid. Size of Array too large 2. The initialization subroutine allows you to process calculation specifications before IP output. and the program ends. Heading lines printed before the first record is read might consist of constant or page heading information or fields for reserved words. Single 3.The first and last cycles of a program differ somewhat from the other cycles. Before the first record is read in the first cycle. but with the special name *INZSR in factor 1. 15) What is the order of initialization in RPG? 1) Global data structure initialization SDS (System Status DS). automatically causing all control level indicators to turn on. Int 20) Can you use recursive calls in RPG/400? No 4. In addition. the program bypasses total calculations and total output steps. Double 5. DS (Program status DS) 2) Subfield value initialization 3) Compile time array initialization 4) Pre run time array initialization 5) *INZSR 16) What is Subfile? A subfile is a group of records that have the same record format and are read from and written to a display device in one operation.

All jobs started on the system must have an associated job description. If a file is to be opened by the OPEN operation in the calculation specifications 26) What do you mean by record locking in RPG/400? When a record is read by a program.21) What is Jobd? A job description is a set of characteristics that are used by the system to process a job. Some of the characteristics supplied by a job description are: • Job queue where submitted jobs are placed • Priority of submitted job • Output queue where job output is placed • Priority of job output placed on an output queue • Job message logging level • User profile to be used for the job They are used . (An immediate message is a message that is not predefined and is not stored in a message file.when you want to determine how system will process one or more job. If a program reads a record for update. no lock is placed on the record. UC Type UC if the programmer is to have control of the first open. a lock is placed on that record. The Send/Receive File (SNDRCVF) command is used by a CL program to send data to and receive data from a device that is being used interactively by a user. If a program reads a record for input. The Receive File (RCVF) command is used by a CL program to receive data from a display device or database file.) 24) What is a Field Reference File? How is it used? Ans : 25) How do you open & close files explicity in RPG/400? Yes by mentioning the File Condition as UC(User Control) If UC is Blank The file can be used by the program. A record that is locked by one program can be read for input by another program. The command reads a record from the file and puts the data from the record into one or more CL variables.( A job is a unit of work on the AS/400 system) Attributes specified in the job description instruct the system to run the job the way you want. 23) How would you send a message through a CL pgm? SNDMSG The Send Message (SNDMSG) command is used by a display station user to send an immediate message from his display station to one or more message queues. Another program cannot read the same record for update until the first program releases that lock. Page 8 of 21 . it is read in one of two modes: input or update. 22) What is SNDF used for? The Send File (SNDF) command is used by a CL program to send a record to a display device that is being used by an interactive user.

WINDOW 3. MNUBAR 5. shared for update. 30) What are the different record formats in a subfile? Ans : 1. exclusive allow read. SFLMSG Page 9 of 21 . PDNSFL 4. SFL 9. PULDWN 8. shared no update.27) What do you mean by file locking in RPG/400? The OS/400 system allows a lock state (exclusive. RECORD 2. A file lock state applies only when a program in another job tries to use the file concurrently. WDWSFL 6. Programs within a job are not affected by file lock states. The file lock state can be allocated with the CL command ALCOBJ (Allocate Object) 28) Can you update a file through CL program. USRDFN 7. if yes how? No 29) How will you display a subfile? Ans . EXFMT the controller name for that subfile. or shared for read) to be placed on a file used during a job.

How you going to handle it. 11) How to define data array in RPG and in CL 12) How to show two subfiles in one screen no using overlay . o Arrange result records by the value of one or more key fields. SETLL. and calculate aggregate functions. CHAIN. SETGT 2) For what purpose we use open query file. o Calculate new field values using numeric and character operations on field values and constants. READE. READP. READ. The join may be either equal or non-equal in nature. This command is used to do any combination of the following database functions: o Join records from more than one file. member. UPDAT. with selection both before and after grouping the records. and record format. WRITE. 5) What type of report you create. 3) Whether we can debug batch program.Sony Music: 1) What are the opcode use in file operation. YES 4) If program is running in batch and in between it get terminate due to some problem. REDPE.show subfiles side by side On control type 8 for “Select Keywords” and In “Subfile Display Layout” Mention some value in “Spaces Between Records” to display 13) How to break in a report other than coding in RPG Page 10 of 21 . o Group records by like values of one or more fields. DELET. for each group. such as minimum field value and average field value. o Select a subset of the available records.

and any override commands.14) What is dataqueue 16) How to send a spool file to a specific printer in CL The Change Spooled File Attributes (CHGSPLFA) command allows you to change attributes of a spooled file while it is on an output queue. the file attributes are derived from the device file description. The Send TCP/IP Spooled File (SNDTCPSPLF) command sends a spooled file to be printed on a remote system. The SNDTCPSPLF command is the AS/400 version of the TCP/IP LPR (Line Printer Requester) command. the program. The next time the job runs and the file is produced. Page 11 of 21 . These changes affect only the current processing of the file. The remote system must be running TCP/IP.

• Debugging & Security by tracking transactions from program. and delete transactions to a data base file • Eliminates the loss of file updates if a file is damaged. What is the scope of Data Area? Data Area has session level scope 4. What is Data Structure? Data Structure is a set of variables 7. • Recovering database up to a specific change. DFU etc. What are different types of Data Structure? User Defined Data Structure File Information Data Structure Program Status Data Structure 8. It is used • For monitoring Add. • Decreases the time required to backup the data base. What is File Information Data Structure? Gives information about the file opened in RPG program. How to declare Data Area in RPG program? *NAMVAR DEFN 5. update. Declare Data Structure in file spec with particular file using IPFK prompt and INFDS keyword. 2. 9. • Serves as an audit trail and activity reporting. What are different types of Array? Compile Time Array Pre-run Time Array Run Time Array 10. Which keywords are related to Data Area? IN OUT LOCK UNLCK 6. What is the need for Journalling? Journalling allows the recording of changes to a data base member.Hexaware: 1. • Changes can be removed from a data base file from the time of a specific change. How to declare field in report? F11 12. How to declare constant in report? F11 twice Page 12 of 21 . How to do Journalling? Create journal receiver Create journal attaché journal receiver to it Start journaling of PF 3. How to start report layout utility? STRRLU 11.

Explain all keywords used with Subfile? Subfile Clear Subfile Display Subfile Control Display Subfile Initialize Subfile End Subfile next Change Subfile Record Number 15. This command removes transferring program from the return stack. What is the scope of QTEMP library? Session level 19. What is the use of Copy Book? Renaming field names. How to rename the record format in RPG Program? In f spec rename record format Page 13 of 21 . What is transfer control? Transfer Control command calls program specified on the command and passes control to it.0 17. How to declare Relative Record Number in RPG Program? What is the attribute of the variable used for Relative Record Number? In file spec declare RRN with display file. What are advantages of transfer control over call? Transfer control removes calling program from the call stack and starts another process while call statement does not remove calling program from call stack and starts another thread. What is use of Message Subfile? Can display more than one message at a time 16. What are different types of Subfile? Elastic Subfile Non-elastic Subfile 14. 24. What is the scope of QGPL library? Global 20. Which libraries does IBM supply? QTEMP QGPL 18. which are exceeding 6 characters limit or containing special characters like _ 21.13. RRN variable should be 4. 23. What is basic structure of CL Program? PGM (Receive Parameters if any) Declare File If Any Declare Variables Logic ENDPGM 22.

Page 14 of 21 . The libraries that are searched & the order the object is searched is determined by a search list called library list. What is Data Queue? Data Queue is a communication between two jobs 30. What is a jobd? A job description is a set of characteristics that are used by the system to process a job. Some of the characteristics supplied by a job description are: • Job queue where submitted jobs are placed • Priority of submitted job • Output queue where job output is placed • Priority of job output placed on an output queue • Job message logging level • User profile to be used for the job They are used . All jobs started on the system must have an associated job description. What is a library list? OS/400 searches a object for its first occurrence until found.( A job is a unit of work on the AS/400 system) Attributes specified in the job description instruct the system to run the job the way you want. What is open query file? Open query file will display the records of file which satisfy the query condition. 31. Can you override database file member? Yes 26. 27. How to delete override? DLTOVR 29.when you want to determine how system will process one or more job. What is scope of override database file? Till you Delete override using command DLTOVR Override to same file again will delete previous override 28.25.

Field . CALL 'QCMDEXC' PLST ** CMD CLRPFM FILE(*LIBL/EDIT) Page 15 of 21 . Record . 4> Compulsary attributes for subfile SUBFILE DISPLAY SFLDSP SUBFILE CONTROL DISP SPFDSPCTL SUBFILE CLEAR SFLCLR SUBFILE SIZE SFLSIZ SUBFILE PAGE SFLPAG 5> What is RAID Disastrous recovery – Mirror imaging 6> What are objects Compile version 7> Specs in RPG program HFELICO 8> Keywords in order for defining physical file File . Select/Omit 9> What does keyword JDFTVAL do Indicates that the system will provide default values for fields when a join operation to a secondary file produces no records.General : 1> Minimum number of line of RPG program for successful compilation 1 line SETON LR 2> Maximum number of records of physical file 20 crore 3> Maximum number of members of physical file The number of members that can be added to the physical file is limited to the number specified in the MAXMBRS parameter of the associated CRTPF command. Key . 10> How is SQL statements written in RPG EXEC SQL Write SQL statement END-EXEC 11> How many nested IF can you specify 100 12> What does ITER do Returns to the start of the loop 13> How to get the System Command Prompt from RPG Program Call QCMDEXC • • • • Define one array named CMD.

xlt’) 15> How to use ftp command 16> What are logical files A description of how data is to be presented to or received from a program. This type of database file contains no data. all the previous overrides on that file are ignored. if you wish to access any other member than an override is required.14> How to transfer data to to excel from CL STRPCO(*NO) Start PC organiser MONMSG MSGID(IWS4010) EXEC(GOTO CMDLBL(EXCEL)) If Organiser already active STRPCCMD PCCMD(‘:\progra~1\micros~1\office\excel. 20>OPM : Original Programming Model. but it defines record formats for one or more physical files.exe + \\653gkwm\qdls\download\chqlist. IF SECURE parameter is used with *YES. Page 16 of 21 . Join logical files: A logical file that combines (in one record format) fields from two or more physical files. 17> How to find related logical file DSPDBR 18> How do you use commitment control 19>Why overrides ? The first member of any database file is accessed when that file is opened.

the record appears as a character string. It contains parameter names and the order in which they are to be associated in the calling and called program. a keyboard key that can be specified with the CF keyword to request the function specified by the keyword. SFLSIZ. SFLCLR. What are the difference between externally described and internally described files ? Externally: A file in which the records and fields are described to the system when the file is created. 6. Data is not returned to the system. and used by the program when the file is processed. 7. The system sends the entire group of records to the display in a single operation and receives the group from the display in another operation. (4) In the RPG licensed program. (3) In the COBOL licensed program. Program described file: A file for which the fields in the records are described only in the programs that process the file. SFLPAG.1. What are sub files ? Explain all subfile keywords? A group of records of the same record format that can be displayed at the same time at a display station. What are the essential keywords used in implementation of a subfile program ? SFLDSP. a 2-character code that is used by a program to test a field or record or to tell when certain operations are to be performed. SFLDSPCTL. a keyboard key that can be specified with the CA keyword to request the function specified by the keyword. Give difference between SETLL & SETGT? Set Lower Limit . (2) An internal switch used by a program to remember when a certain event occurs and what to do when that event occurs. What is the difference between command function & command attention keys (CA and CF)? CA: In DDS. CF: In DDS. (1) A 1-character or 2-character code that is used by a program to test a field or record or to tell when certain operations are to be performed. Set Greater Than 11. 10. a 2-character code that is used as a logical variable or statement label. 3. What are indicators ? What is the indicator used to Terminate an RPG program ? 2. Data is returned to the system. Page 17 of 21 . 5. To the operating system. 4. 8.? How do you define a composite key? What is the PLIST opcode used for ? A list of values that provide a means of associating addressability of data defined in a called program with data in the calling program. What are the different specifications that make-up an RPG prg? HFELICO How do you rename a field in an RPG prg. How do you access a particular record in an indexed file? CHAIN 9.

(5) In object-oriented programming. or indexes. Also known as spooled output file. if no – why? Yes. a file that stores text or source statements instead of data. Member: Different sets of data. *PGM. An object is anything that exists in and occupies space in storage and on which operations can be performed. OUTQ: An object that contains a list of spooled files to be written to an output device. 13. An object is an instance of a class. data.12. Object? Source physical File: In Client Access. *QRYDFN. *DTAARA. Library: A system object that serves as a directory to other objects. How to convert a string of alphanumeric digits to numeric e. Can you have more than one object with the same name in library – if yes how. Some examples of objects are programs. (2) A visual part of the interface that the user can work with to perform a task. *MENU 16. What is spool file? Differentiate it from an OUTQ? A file that holds output data waiting to be processed. such as databases. tables. within one database file. and allows the user to find objects by name. Source Physical File. such as information waiting to be printed. 14. A library groups related objects. Member.g. Object: (1) A named storage space that consists of a set of characteristics that describe itself and. 15. The system-recognized identifier for the object type is *LIB. and folders. objects define the attributes of queue managers. How do you call a CL program from a RPG and vice-versa? CALL Page 18 of 21 . anything that can be created or manipulated with SQL statements. The system-recognized identifier for the object type is *OUTQ. 17. queues. a software entity consisting of instance data and the methods that can be performed on that data. such as a printer or a diskette. Explain OVRDBF and its parameter (1) To specify attributes at run time that change the attributes specified in the file description or in the program. ‘0123’? 18. libraries. files. (4) In DB2 UDB for AS/400. views. What is Library. each with the same format. (3) In MQSeries. in some cases. and process definitions. Icons and text are examples of objects. (2) The attributes specified at run time that change the attributes specified in the file description or in the program. Same object name is allowed but with different object type. Name a few different types of objects? *FILE.

Explain Editword and Editcode? Editword: A user-defined word with a specific format that indicates how editing should be done. the system stops saving changes and the access path is completely rebuilt the next time the file is opened. 20. 24. no matter what is specified for MAINT. How do you call a screen in a CL Prg? SNDRCVF 25. Explain MONMSG command? Monitor message 28. If the number of changes between a close and the next open reaches approximately 10 percent of the access path size. To prevent a lengthy rebuild time when the file is opened. then the access path is deleted. added. *DLY The maintenance of the access path is delayed until the physical file member is opened for use. Keyed sequence access path: An access path to a database file that is arranged according to the contents of key fields contained in the individual records. the access path is changed only for records that have been added. *IMMED must be specified for files that require unique keys. when the file is opened frequently or when the key fields in records for this access path change infrequently. If Yes – How ? 22. *DLY is not valid for access paths that require unique key values. deleted. The possible values are: *IMMED The access path is updated each time a record is changed.19. or changed since the file was last opened. *REBLD The access path is completely rebuilt each time a file member is opened. What are the different modes in which a file can be opened? I – Input (for reading) O – Output (for writing) U – Update (for Updating) C – Combine (for reading as well as for writing) 21. What is access path? Explain *IMMED in it? Access path is the order in which records in one or more database files are organized for processing by a program. Then. *DLY should be specified only when the number of changes to the access path between successive opens are small. The access path is maintained until the member is closed. *REBLD cannot be specified for files that require unique keys. While the file is open. Explain EXFMT opcode? Write/Then Read Format 27. Editcode: A letter or number indicating that editing should be done according to a defined pattern before a field is displayed or printed. What is the maximumm size of variable name in RPG? If an externally described file has a variable name longer than 6 characters then how do u handle it. Arrival sequence access path: An access path to a database file that is arranged according to the order in which records are stored in the physical file. that is. changes made to its members are immediately reflected in the access paths of those members. Can u add a record when a file is opened in UPDATE mode – if No – Why. Explain RETRN opcode? Page 19 of 21 . Explain the difference between SNDF and SNDRCVF command? 26. or deleted from a member. 23.

32. The system-recognized identifier for the data area is *DTAARA. How do you populate values from one array to another array? MOVEA 34. It must be continued with keyword JFLD. Page 20 of 21 . File level keyword used is ‘JFILE’. which contains fields to be joined. Is member is an object? 31.Return to Caller 29. Explain Data Areas and Data Queues? Data Area: A system object used to communicate data. JFILE contains the list of PFILES to be joined. What is library list? A list that indicates which libraries are to be searched and the order in which they are to be searched. The system-recognized identifier is *DTAQ. What is JLF and how to create it? Join logical file: The record format name must be different from the record format names of various PF used in the JLF. JOIN Specifies the pair of files joined by the Join Specification. The systemrecognized identifier is *LIBL. JFILE Specifies the physical files used by the join logical file. which contains files to be joined. A A A A A A A A R USRJFM J J USRID DEPTNM COMPNM JFILE(SUSER USRDPT TEMP) JOIN(SUSER USRDPT) JFLD(USRID USID) JOIN(SUSER TEMP) JFLD(USRID USSID) JREF(SUSER) Note: J denotes Join specifications. such as CL variable values between the programs within a job and between jobs. It must be continued with keyword JOIN. Data Queues: An object that is used to communicate and store data used by several programs in a job or between jobs. 30. JREF Specifies the physical file containing the field. JFLD Specifies the join fields in a Join Specification. What is INZSR? Initialization routine 33.

what will you do? 38. If job ends abnormally. and all the journal receivers on the system for the journal. two in program A and two in program B. in a journal. or securityrelevant events. and program B does not update files. If 4 files are getting updated.35. If program A updates 2 files properly. What is journalling? Journal:A system object that identifies the objects being journaled. changes to other journaled objects. the current journal receiver. The object type is *JRNRCV. Journal receiver :A system object that contains journal entries added when events occur that are journaled. such as physical file members or access paths. Page 21 of 21 . such as changes to a database file. How to do journalling: Create journal receiver Create journal attaché journal receiver to it Start journaling of PF 36. The system-recognized identifier for the object type is *JRN.How do you use commit control. the changes made to objects. Journaling: The process of recording. Can two record formats be incorporated in PF and LF? 39.? 37. or the depositing of journal entries by system or user functions. program B is called from program A.

Sign up to vote on this title
UsefulNot useful