This action might not be possible to undo. Are you sure you want to continue?
How will I explicitly open a file in an RPG program? Ans: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. What is maximum size of data area? Ans:9999. How to fire a JOB? Ans:SBMJOB. How many levels of security are there on AS/400? Ans:There are 10 to 50 level of security on AS/400. How to translate field values form lower case to Upper case? Ans:By using opcode XLATE. What are the maximum parameters can be passed from one RPG program to another RPG program? Ans:255 What is the maximum length of an OCCUR? Ans:9999. What is a subfile? Ans:Subfile is a group of records which can be used for (Displaying, Adding new record, Modifying the existing record, and Deleting the existing records). What is maximum size of a subfile? Ans:9999. How do you write and read a value (similarly as EXFMT of RPG) using a display file in CL? Ans:SNDRCVF. How do you display a screen in CL? Ans:SNDF. How to check end of file in CL? Ans:Monitor the message ID (CPF0864). Can you update a file in CL? Ans:NO. Can you add a record to a physical file through CL? Ans:NO What opcode is used for submit job? Why it is used? Ans:SBMJOB opcode is used and it is used for background processing. How do you monitor message in CL? Ans:By using monitor message ID: (MONMSG MSGID (CPF0000) Except report design what else can be done by O spec? Ans:We can write a Physical File from O spec. What is the full for of CA and CF? Ans:Command Attention and Command Function. Difference between WRKUSRJOB and WRKACTJOB? Ans:All the jobs in WRKUSRJOB are seen including Active jobs where as in WRKACTJOB only active jobs are seen. What are the three levels of SDA? Ans:File level, Record level, Field level. What is *PSSR? Ans:It is a system subroutine which is executed by default when any error occurs in a program. How many maximum parameters can be passed from on RPG program to another CL program? Ans:40 How many maximum arrays can be used in a single RPG program? Ans:200. How many maximum loops can be used in a single RPG program? Ans:100 How many maximum printer files can be used in a single RPG program? Ans:8
Why do we define MOVE *ON *INLR? Ans:It frees the memory. All the fields and parameters in the memory will become blank. How do you shutdown your IBM server? Ans:PWRDWNSYS. If your workstation does not show login screen what might be the problem? Ans:Problem with some subsystem. You have given a job for printing and you are not getting the printout what might be the reason? Ans:Some more pending jobs might be there in Job Queue. There are multiple jobs for printing in job queue and you want to print a important document then what will you do? Ans:Change the priority or change the job queue name. How to see the CPU usage? Ans:WRKACTJOB or WRKSYSSTS While designing the screen, F3 function key is kept common for all record formats. On which level should it be defined? Ans:File Level Write down any two mandatory keywords used when defining a subfile? Ans:SFLDSP, SFLDSPCTL, SFLCTL, SFLSIZ, SFLPAG. While designing the screen user wants to add file level keywords, then which function key should be pressed? Ans:F14. Which Function key should be pressed to define hidden field while you are working with SDA? Ans:F4 Which function key should be pressed to watch all strings defined on the SDA screen? Ans:F20 While designing the screen using SDA, which function key should be pressed to get the field from the field reference file? Ans:F10 From work with member using PDM screen you have to modify existing member using SDA, which option do you select? Ans: 17 While designing the report using RLU, user wants to add record level keyword then which function key should be pressed? Ans:F18. If user wants to add one field on the report then which function key should be pressed? Ans:F11. 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? Ans: &3L
If user wants to center the company name on his report then which line command will be used? Ans: CF. If user wants to change the length of the numeric field defined in report then which combination of keys will be used? Ans:F23 & F10. What is difference between SKIPB (2) & SPACEB (2). If user wants to define new numeric field on record format then which line command will be used? Ans:VF. Maximum report length is 132, if user is designing a report using RLU? Ans:FALSE (378 Max). To change constant field defined on RLU screen which field level keyword should be used? Ans:DFT Which field level keyword should be used to change any numeric field of length 8 to 99.99.9999 format? Ans:EDTWRD (‘ . . ‘) Using Query, its also possible to create level break reports. 2
Objects. Difference between Source Physical File & Physical File? Ans:Source Physical File contains members who contain source statements & Physical File contains members. Can a Join Logical File be updated? Ans:No. What is the command to know how many LF are related to a PF? Ans:DSPDBR (Display Database Relationship) What is the command to know key fields of file? Ans:DSPFD (F4) *ACCPTH(Access Path). What is Library? Ans:A library is a system object that serves as a directory to other objects or collection of object What is Library List? Ans:A job’s library list defines the path of libraries that the job follows when trying to locate programs. Members & User Options. Type of Source File & Physical File? Ans:Source File: . LF. What is the format of As/400 Commands? Ans:Verb Object Qualifier Verb: . What is the object type of PF.Ans:TRUE. It is available for read access. with the PF’s ‘joined’ by a common key value.identifies your job What is externally described file? Ans:A file. user will be able to ___________ from Physical File? Ans:Add/Update/Selected or all fields.action Object: . How many types of files are available on As/400? Ans:There are 2 types of files on As/400 they are Databases files & Device files. is called as external described file. In which Specs can PF be made internally? Ans:In I Specs. What is Logical File? Ans:A Logical file is an Access path to the Physical File. Printer file & Display file? Ans:*File 3 . files or other As/400 objects.*PF/DTA What’s the use of STRPDM? Ans:To work with Libraries. What is a Join Logical File? Ans:A join Logical File can be built over the two PF’s. User (*test) & Product (*prod). Types of Libraries on As/400? Ans:There are 3 types of libraries on As/400 they are System (*sys). What is the difference between normal UPDDTA to PF and updating using DFU program? Ans:Both are same only difference is DFU allows you to add or change selected fields. Which path a good programmer should use? Ans:Unqualified path. which is created externally & described in the program.*PF/SRC Physical File: .on which action is performed Qualifier: . How can you specify no duplicate key? Ans:By defining the unique key. Using DFU. which contain data. What is Qualified & Unqualified path? Ans:Qualified path means mentioning object name along with library name while Unqualified path means directly writing the object name.
How many Specs are there in RPG & Which are they? Ans:There are 7 Specs in RPG they are H. F. *HIVAL.It does not retains the value into the buffer memory. 4 . In which Specs Arrays. What is the difference between GOTO & EXSR? Ans:EXSR is a conditional branching while a GOTO is an unconditional branching. Which is the Primary Editor of As/400? Source Entry Utility (SEU). Which are the figurative constants used in RPG? Ans:*ZERO. Which indicator is used for Read? Ans:EQ (Equal to) How many types of display are available on As/400 for user interaction? Ans:4 Types they are Entry. Difference between CA & CF? Ans:CA: .What are the different methods to access SEU? Ans: Use the Start Source Entry Utility command (STRSEU) Option 8 from STRPGMMNU Through Program Development Manager (PDM) Which are the member types which SEU supports? Ans:RPG. CL. *ON & *ALL. CF: . The label specified must appear as the Factor1 of a TAG operation somewhere in the program. What is the syntax for PLIST? Ans:*ENTRY PLIST PARM What are indicators? Ans:Indicators are inbuilt class of variables for RPG. What are the basic features of SEU? Ans:Prompt depending upon type. C & O. LF. Menu. PRTF & DSPF. shows right hand side date & left hand side the line number. Tables & Constants are defined? Ans:In I Specs. *ZEROS. When you are defining a flat file in your program in F Specs which format will you specify? Ans:Flat File: . How does the RUNQRY show the output? Ans:RUNQRY shows the output always in RRN (Relative Record Number) & not in keyed sequence.It retains the value into the buffer memory. control is transferred to label designated in the result field. *LOVAL. of lines on that page. *OFF. What is a Spool File? Ans:Printed output items placed in an output queue are known as spooled files. *BLANKS. GE. PF.*BLANK.F (Fixed Length) Other File: . L. What does the OVRDBF command do? Ans:It overrides the PF temporarily for a job. I. Information & List Display. of lines moving to the next page while Space before leaves the specified no. What is CAB? Ans:It compares Factor1 with Factor2 & if condition is true. LE & EQ.E (Externally Described) Difference between skip before & space before? Ans:Skip before leaves the specified no. Which are the Relational Operators in RPG? Ans:GT. E. LT. How many printer files maximum can be used in single RPG program? Ans:8 because of the overflow indicators OA-OG & OV. What does EXFMT does? Ans:Write & Read.
READE. RANGE or VALUES keyword be overridden? Ans:Yes. Explain the use of DFTWRT display keyword? Ans:No records will be displayed until there is any I/O operation.In ‘O’ Specs what is the opcode for write? Ans:EXCPT. What is RPG Fixed Logic Cycle? Ans:A logic the compiler supplies is called RPG Fixed Logic Cycle. What the purpose of OVRDTA. READP. runs & continues to execute instructions without human intervention or control while Interactive job are user driven. READPE CHAIN. underline and highlight display attributes were active? Ans:The result is same as if you had specified ND. OVRATA keyword (field or record level) can be used to override the existing display attributes of a field or record already on the display. What would be the effect on the field where reverse image. which keyword would have priority? Ans:CSRLOC gains priority. The Data Tag detect whether the field has been changed as a result of user input. Can error messages as a result of a COMP. OVRATA keywords? Ans:OVRDTA keyword (field or record level) can be used to override the existing data contents of a field or record already on the display. to detect whether field has been changed as a result of user input. What is the maximum number of records you can specify in a display file? Ans:1024 How can a screen field that has changed since the last output operation be detected ? Ans:Attach the MDT (modified data tag) attribute to the field. 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. through CHKMSGID keyword. What does LOKUP does in Tables & Arrays? Ans:The LOKUP opcode searches the Factor1 entry in table or array. SETLL. File Access Opcodes? Ans:READ. What is the use of DSPATR(MDT) keyword? Ans:Sets on the modified Data Tag of the field. SETGT. Difference between Interactive & Batch Job? Ans:Batch job begins. EXCPT & WRITE. How can a message from a message file appear as a constant on the screen? Ans:By using MSGCON (message constant) keyword. KLIST. KFLD. In conjunction with what other keyword must OVRDTA and OVRATA be used? Ans:PUTOVR keyword must used. If DSPATR(PC) and CSRLOC were specified for a format. What is the purpose of FRCDTA keyword ? Ans:Immediately display a record format without waiting for the next I/O operation. How can we run a Batch Job? Ans:SBMJOB Command. What is the purpose of the INDARA keyword? Ans:This File-level keyword is used to remove option and response indicators from the buffer and places them in 99-byte separate indicator area. What keyword must be used with PROTECT keyword? 5 . Explain the purpose of KEEP and ASSUME keywords? Ans:KEEP: Keep the display from being deleted when the display file is closed.
Subfile Record Number. where as Message subfile is defined by SFLMSG keyword. SFLSIZ : it is an attribute which specifies the number of records can be stored in subfile. What is SFLPAG and SFLSIZ ? Ans: SFLPAG : it is an attribute which specifies the number of records that can be displayed in a screen. Subfile Control Record Format. the Bottom/More message could be displayed at end of screen. What is the Select and Omit criteria in logical file? Ans:This is used to specify rules for the Selection/Omission of records from a Physical File. Ans:512 Maximum number of subfiles that can Defined in a RPG program for one display file is Ans:24 Maximum number of subfiles that can be active for a single file is? Ans:12 Can more than one subfile record be displayed on one line? Ans:Yes. by using SFLLIN keyword. 6 . Associated Subfile Keywords. Explain the difference between defining Subfile and Message-subfile? Ans:Subfile record is defined by SFL keyword. How will you display a particular page in subfile? Ans:Move a valid relative record number (RRN) in the field specified using SFLRCDNBR keyword in DDS. What are the two record formats a subfile contain ? Ans:Subfile record forma (SFL). NUMERIC and LOGICAL What is Multi-format logical file? Ans:Logical which uses fields from two or more physical files. to select/omit records. How to toggle between single line and Multi . Relative Record Number. Can fields be concatenated INa logical file level? Ans:Yes. What are all the contents of subfile? Ans:Subfile Record Format.Ans:OVERLAY What is Subfile? Ans: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). CHAR. How do you specify the number of records to roll in a subfile? Ans:Use SFLROLVAL keyword in DDS along with number. What is the maximum number of subfiles that can be specified in a display file. LGL How do you pass parameters in CL? Ans:Using PARM keyword. by using CONCAT keyword When would the ALL keyword be used? Ans:Use with Select or Omit.line display of a particular record in a subfile? Ans:Using SFLDROP keyword. How to pick up the changed records every time in a subfile after the first change made? Ans:Seton SFLNXTCHG keyword indicator and update the subfile record. What are the different types of variables available in CL? Ans:DEC. which specifies the number of records to scroll at a time. What are the valid user defined data area types? Ans:CHAR. What is the use of SFLEND keyword? Ans:By specifying this keyword.
TCAT.Concatenate two variables or constants into one continuous string. What are the different types of messages in CL? Ans:Immediate message. Field level What is difference between CAT. BCAT? Ans: CAT . Record format level. BCAT . but a single output message subfile is a special type of subfile that is supported well in CL. Use Program described files.Truncates all trailing blanks in the first character string. What is the use of Header Specification in RPG/400? Ans:It identifies by H in column 6. to assign the files to specified devices.Truncates all trailing blanks in the first character string. TCAT . then the two character strings are concatenated. provides informaion about generating and running programs. Use Printer or ICF files. Break message. arrays and tables. Use subroutines. How many files can be defined in F specs? Ans:50 How many printer files can be defined in F specs ? Ans:8 Give three main purposes of File specification ? Ans:To define files. Specify different indicators used in RPG? Ans:Overflow indicators Record Identifying Indicators Field Indicators Resulting Indicators Control Level Indicators What are Control level indicators? Ans: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.What are the different types of keywords in display files? Ans:File level. Program message. What is the use of L specs in RPG? Ans: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 the use of E specification in RPG? Ans:Extension Specs describes all record address files. How do you specify page overflow indicator for printer files in RPG? 7 . User message How to trap errors in CL? Ans:By using Monitor Message Command (MONMSG) What is the maximum length of a variable name in CL? Ans:Maximum 11 characters (including '&') What are the limitations of CL (compare to RPG) ? Ans:You can not use CL program to ADD or UPDATE records in database files. Use the concept of subfile (to display more than one record). the two character strings are concatenated. You cannot declare more than one object (file) in a CL programme. one blank is inserted. In which specification the report layout can be defined? Ans:O Specification. When will DUMP and DEBUG opcodes be ignored? Ans:If blank is specified in position 15 of H specs. to describe the files.
Makes all changes to the files that have been specified in output operation since the previous COMIT or the begining of operations under commitment control(if there has been no previous COMIT or ROLBK operation). What is SCAN and XLATE? Ans:SCAN operation scans a character string (base string) contained in factor 2 for a substring (compare string ) contained in factor 1. Can you specify a display file to be used in the following modes Input. What opcode could be used to test an alphanumeric field for all numeric values? Ans:TESTN What opcode will be used to test the zone of a character field? Ans:TESTZ How to read database records without locking them? Ans:Put 'N' in position 53 of C specs. What does the opcode FREE do? Ans:The FREE operation removes a program from the list of activated programs. or Combined modes ? Ans:Yes. Can we define Multi-dimensional arrays in RPG? Ans:No. DS is defined as program status DS by an S in position 18 of the DS statement. frees static storage and ensures program initialization (first cycle processing) the next time program is called. What is Program Status Data Structure? Ans:A Program status DS can defined to make program exception/error information available to an RPG program. What is XFOOT opcode? Ans:Adds all the elements in a numeric array. What does opcode POST do? Ans:Puts information in INFDS. What is a Primary File? Ans:It is used in RPG Program Cycle to automatically read records in a cycle. How can we sort an array? Ans:By using SORTA opcode. *ROUTINE : contains name of routine in which the exception/error occurred 8 . How do you use commitment control in RPG program ? Ans:Using COMIT operation. When is a TAG statement used in RPG? Ans:It is used as Label. What is the maximum number of elements in an array? Ans:9999 What is a Program Described file in RPG? Ans:The field name and length of the fields are defined with in the RPG program. and places the sum in the result field. It does not close file or unlock data area. *STATUS contains status code. Can a indexed file be accessed in arrival sequence in RPG program? Ans:Yes. How do you use exceptional write in C specs? Ans:Using EXCPT opcode. What does 'SR' in columns 7-8 of C specs mean? Ans:Calculation operation is a part of RPG subroutine.Ans:Specify an indicator in position 33-34 of F specification. Output. What is externally described file ? Ans:All information about the fields is specified in DDS and the RPG program can use them with in the program. XLATE operation translates characters in source string (factor 2 ) to the from and to strings (factor 1 ) and put into the result field. What is match field indicator? Ans:Matching record indicator is seton when all the matching fields in the record of a secondary file matches with all the matching fields of a record in a primary file. What is the length of a variable in RPG? Ans:6 Characters. What does CHECK opcode is used? Ans:The check operation verifies that each character in the base string (factor 2) is among the character indicated in the comparator string (factor 1).
FCFO? Ans:These keywords are used at file level. What is the maximum number of times Multiple Occurrences DS can occur in a program? Ans:9999 What are all the compiler directive statements? Ans:/TITLE. /EJECT. the record being processed when the exception/error occurred or the record that caused the exception/error. reading input (READ) 2. 1. Through join logical file we can't made changes in physical file. Why would you prefer OPNQRYF than logical file? 9 . and protocols that will provide a consistent framework across the System/370. But access path occurs before the file is read (but not necessarily). The built-in program cycle includes the following logical steps. AS/400 and PS/2. Physical contains data derived by the field reference file. writing output (WRITE) What is the Function of PDM? Ans:Productivity tool for copying. Distinguish between logical file and physical file? Ans:Physical file contains only one record format. What is the difference between regular logical file and join logical file? Ans:Regular logical file contains more than one record format. Record format name in regular logical file should be same based on the physical file. The purpose of each one is described below: FIFO: The duplicate key records will retrieved in first in first out order. During execution. ? Ans:255 What is File Information Data Structure? Ans:File Information Data structure (INFDS) can be defined for each file to make file exception/error information available to the program. scanning. changing & creating source files. Physical file contains actual data.The status code. Use OPEN and CLOSE opcodes in RPG program to open and close files. an RPG/400 program automatically follows a sequence of operations for each record that is processed. /COPY What is SAA? Ans:Systems Application Architecture (SAA) is a collection of selected software interfaces. conventions. Logical file doesn't contains data but it provides view from the physical file. A file information data structure contains predefined subfields that identify: the name of the file for which the exception/error occurred. Through logical file we can made changes in physical file. What is field reference file? Ans:Field reference file is a file. How many parameters can be defined in a RPG program.*PARMS : contains the number parameters passed to this program from the calling program. Join logical file contains only one record format. processing calculations (PROCESS) 3. What is the function of SEU ? Ans:A utility for editing programming language source code. /SPACE. How can the user implicitly open and close the files in RPG program ? Ans:Enter UC in position 71-72 of F specs. The last operation being processed when the exception/error occurred. Because access path maintenance performed on the file. FCFO: The duplicate key records will retrieved in first changed first out order. Logical file contains more than one record format. What the purpose of the keywords FIFO. deleting. What is the use of SDA ? Ans:Screen Design Aid is used to create display files interactively. The RPG routine in which the exception/error occurred. and it doesn't have member. Record format name in join logical file should be different. What is the difference between access path and Dynamic select? Ans:Dynamic select occurs whenever the program reads file. LIFO: The duplicate key records will retrieved in last in first out order. LIFO. which contains field definitions and descriptions.
the files exists in production library not allowed to update. What is the difference between production library and test library ? Ans:In debug mode. records won't be read. Hence using RGZPFM command we can compress the deleted records space. What is the purpose of reorganizing the physical file i. What is the difference between Array and Table? Ans: Array: Array is stored any where in the body of the input records. What is the purpose of SFLNXTCHG keyword in a subfile? Ans:Which is a subfile record format keyword. What is the necessary keyword used in a physical file to refer field definitions from the field reference file? Ans:REF which is a file level keyword is necessary to define at file level in a physical file. still the space used by the deleted records not used by the other purpose. * If the factor 1 is *NAMVAR then DEFN opcodes defines the field as a data area. The syntax is as follows: REF(library name/name of the field reference file) What is purpose of declarative statement DEFN? Ans: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. What is difference between fully procedural file and primary file? Ans:In primary file the records will be read and processed from begining to end. When will you use OPEN and CLOSE opcodes in RPG program? Ans:If you specify the letter "U" at columns 73 . the files exists in test library allowed to update. the internal indicator MDT (modified data tag) is automatically set off by the system. e.74 in a file description specification indicating that user control on a file. Delay : Rebuild will not takes place. Because internal indicator MDT would be off.only open access paths will update whenever changes made to the file. Rebuild takes place whenever remaining access paths will be open. Array: Array can be searched randomly. This order is not 10 . RGZPFM? Ans:Even if you delete the records in a physical file through the program. Table: Only one table element can be accessed at a time. Attributes like * Maximum number of members * Member size * Level check enforced * Open data path is shared How can you identify End of file in CLP program? Ans:With the help of MONMSG MSGID(CPF0864) we can identify end of file in clp program. OPNQRYF creates temporary access path. Hence you should be explicitly set on the MDT by SFLNXTCHG keyword. If you perform read on the subfile. Table: Table is stored at the begining of the input records. Table: Table can be searched consecutively. Array: We can access all the elements in array by specifying the array name.Ans:The main difference is : Logical file creates permanent object on the system. Hence we have to explicitly open and close the file in a program. . In the other hand. Rebuild. If you again perform read on the same records. What is the purpose of CHGPF (Change physical file) command? Ans:CHGPF command is used to change the attributes of a physical file. What are the different types of access paths maintained on the file? Ans: Immediate: All the access paths (open and close) associated with a file will be updated whenever changes made to a file.
If the data area object found. 2: If the data area object not found. What is the purpose of RTVMBRD command? Ans:In order to access the information related to member. The logic flow is controlled by the opcodes in RPG program. * The sub system QINTER takes the job from the job queue and starts processing. 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. SFLDROP: To drop the second line of multiple line subfile. next we can dynamically create the data area. How many secondary files allowed in a program? Ans:More than one secondary files are allowed in a program. * The output generated by the interactive job is placed on the output queue * The spool sub system QSPL prints the output. * Job is created and job name.+ 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. The following are valid attributes: For All Fields Display . What is the function of DSPATR (display attributes) keyword? Ans:Use this field level keyword in display file to specify one or more display attributes for the field you are defining. What is the purpose of FRCDTA (Force Data) keyword? Ans:Use this record-level keyword to immediately display a record format. Define an Interactive Job? Ans:* A user requests a job.Attribute Meaning 11 . It is always good CLP programming approach to check the object before you rename. How many primary files allowed in a program? Ans:Only one primary file is allowed in program. 3. What is the difference between externally described file and program described file? Ans:The field definitions and descriptions are defined out side of the program in a externally described file. without waiting for the next input or output/input operation. In fully procedural file the records will be read and processed in any order. we can RTVMBRD command. job attributes are assigned. * Job is placed on a job queue. control transfers to statement below ENDDO. You can specify the DSPATR keyword more than once for the same field. we can find existence of object on the system. What is the purpose of SFLFOLD and SFLDROP keywords? Ans: SFLFOLD: To fold the second line of multiple line subfile. The field definitions and descriptions are defined in side the program in a program described file. delete the objects on the system.changed. How can you check the existence of object in a system? Ans: With the help of CHKOBJ clp command. the MONMSG command executes with the help of message identifier. and you can specify more than one attribute for the same keyword.
all the files used in program will be closed. all the files used in program will remain open. What is the maximum number of record formats in DSPF? Ans:1024 (One thousand and twenty four) What is the maximum number of fields under a record format of physical file? Ans:8000 (eight thousand) What is the maximum number of parameters allowed in RPG? Ans:255 (Two hundred and fifty five) What is the maximum number of parameters allowed in CLP? Ans:43 (Forty three) What is the maximum number of subroutines allowed in RPG? Ans:254 (Two hundred and fifty four) What is the maximum number of files allowed in RPG? Ans:50 (Fifty including eight printer file) What is maximum number of Arrays allowed in RPG? Ans:250 (Two hundred and Fifty ) Where can you specify an indicator in LOKUP operation? Ans:In 'EQ' position.HI High Intensity . The maximum of number of files allowed to join is 32 (thirty two). What is a Logical file? Ans:It is nothing but a logical view provided by the physical file.RI Reverse Image . JREF. 12 . What is the purpose of PUTOVR (Put with explicit override) keyword? Ans: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. If you specify RETRN.CS Column separator . What is Join Logical file? Ans:Join logical file joins more than one file.ND Non Display PC Position cursor . JFLD. JFILE. What is the purpose of OVRDTA (Override Data) keyword? Ans:Use this field level keyword with PUTOVR keyword to override the existing the data contents of a field already on the display.BL Blinking field . What is a Physical file? Ans:Physical file nothing but a table contains a only one record format in which we can describe the field definitions and descriptions. What are the necessary keywords for the Join Logical file? Ans:JDFTVAL. What is a Member? Ans:It is a subset of data records of a physical file. What is a Non-join logical file? Ans:It only provides logical view based on the physical file. What are necessary keywords to code message subfile? Ans:SFLMSGRCD. SFLPGMQ What is the difference between SETON LR and RETRN? Ans:If you specify SETON LR.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 What is message subfile? Ans:Message subfile is special file contains multiple messages taken from program message queue and placed in message sub file for display on the screen. This is also called as regular logical file. JOIN. SFLMSGKEY.
* File Description specification . *General Data Area . you need to be open and close files explicitly in a RPG program. At what level S. 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. printer files. The S/O is allowed in Logical file only. How do you know that records are locked? Ans:By using a command WRKOBJLCK.* Extension specification * Line counter specification . But we have to give record length.What is the necessary keyword for Non-join logical file? Ans:PFILE (which is record level keyword) How many levels are there in a Physical file? Ans:Four levels. With the help of CRTPF we can achieve this. Hence we can access records through the key field. Field level. They are File level. discket files. What is the purpose of Indicators in RPG? Ans:In order to control the logic flow.* Output specification When do you use F-spec. . What is a Keyed physical file? Ans:Defining a field as a key in physical file. How many specifications are there in RPG/400? What are they? Ans:There are seven specifications are exits in RPG/400. What is default data type (if you define decimals '0') in Physical file? Ans:Packed decimal What is default data type for the fields(sub fields) defined in data structures in RPG? Ans:Zoned decimal What is the use of JDFTVAL in join logical file? Ans:If you specify JDFTVAL at file level. O are to defined at key field level. How do you read data area in an RPG program? Ans:With the help of 'IN' opcode. local data area. * In order to define a named data structure as a file information data structure.It can be created by user implicitely or explicitly It can be referred by any other jobs. * In order to rename the record format of a database file in a program. 13 . continuation line ? Ans: * In order to refer the named record format as a subfile record format in the program. even the primary file record does not match with secondary file record. What is arrival sequence? Ans:The records will be accessed the way in which records are added to physical file. we can access the data area record in to the program. They are listed below: * Header Specification . pip (program initialization parameter data area) data area. tape files etc. What are the different types of Data Areas? Ans:The different types of Data Areas are general data area. What is the difference between Packed decimal and Zoned decimal? Ans:Packed decimal : One digit occupies 1 byte. We have to define it in a file level. Is it possible to create a physical file without DDS? Ans:Yes.O are defined and what they will do? Ans:S. Key field level.* Input specification . Record level. Zoned decimal : One digit occupies 2 bytes. When do you explicitly open files and close files in an RPG program? Ans:If you specify the letter ' U ' at column 73-74. What is the use of UNIQUE keyword and what level it is defined? Ans:It will avoid to enter duplicate key values.* Calculation specification . the join takes place. group data area. What are the various types of device files? Ans:Display files. What is a composite key? Ans:Defining more than one key as a key field in physical file. we can use indicators in RPG.
QCBL. QSYS. It can be created. such as information waiting to be printed. 0) What is DDM ? Ans: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. QUSRTOOL. The attributes are: Job Number Unique system generated sequential number Job Name Any user defined name (Max 10 char) User Name Who initiated the job.It can be associated with a library. How many libraries can be there in library list ? Ans:Total 40 (15 system and 25 application) What is Folder? Ans:A Folder is a named object that is used as a directory for documents and other folders. Name few IBM supplied libraries? Ans:QGPL. What is a Library in AS/400? Ans:A library in AS/400 is an object that serve(acts) as a repository for other objects. TFRCTL Which single RPG opcode performs both SETLL and READE? Ans:CHAIN What is term CUA . It is automatically created and deleted by the system. It is not associated with any library. What is an Object? Ans:An object is any thing that exists in and occupies space in storage and on which operation can be performed. How are the objects stored on AS/400? Ans:All objects are stored on AS/400 in a single level storage. In this method all objects are referenced by one virtual address which is translated in to a physical address whether it is an auxiliary storage or main memory.It can not be referred by any other job. What is Spool file. Folders can be filed with in another folder. What are various techniques to pass parameters from one program to another? Ans:PLIST. CALL. QTEMP. What is Job. QRPG What is library list ? Ans:A list that indicates libraries used for the process and the order in which it has to be searched System identifies it in *LIBL. What is Job description? Ans:A Job description defines an environment in which a batch job or an interactive job to be 14 . deleted by the user.It is automatically created and deleted by the system We can access the group data area value through clp. It is meant for group jobs. What are the attributes of a Job? Ans:A Job is a basic unit of work on AS/400. * Local Data Area . SAA? Ans:Common User Access System Application Architecture Why is AS/400 called Object Oriented Machine? Ans:Everything on the AS/400 System that can be stored and retrieved is contained in the object.It is meant for pre start jobs. 0 Release 2. *Group Data Area . Why is it required? Ans:A file that holds output data to be processed. *Pip Data Area . What is the version of OS/400 that we have? Ans:V4R2 (Version 4.
The group jobs can have different library lists and different output. Program Initialization Parameter (PIP) Data Area. How to create files dynamically without DDS? Ans:Through OPNQRYF What command must be executed before executing OPNQRYF command? Ans:OVRDBF (Override Data base file) What is Data Area? Ans:Data area is an object used to hold data for access by any job running on the system. What is a Device file? Ans:A device file contains the description of how data is to be presented to a program from a device or vice versa. Device file can be Printer. What is the difference between Interactive & Batch Job? Ans: Interactive Job: A Job started for a person who signon to a workstation. What is the maximum number of key fields allowed defining in a physical file? Ans:120 What is acronym of RPG? Ans:Report Program Generator What is the native language of AS/400? Ans:RPG/400 Why RPG/400 is famous? Ans:* Easy to code and analyze. all COBOL/400 messages are stored in a file. and action performed by the system on the log. Batch Job : A predefined group of processing actions submitted to the system to be performed. For example all RPG/400 messages are stored in a file. including auto-start jobs. One subsystem can have more than one active job at a time. It is as though logging into the same user-id many times. What is the purpose of OPNQRYF (Open Query File)? Ans:OPNQRYF is used to select certain records of the database file based on the QRYSLT (Query select ) condition.executed. Tape and Remote system. What is the type. Local Data Area (LDA). There should be an initial group job and it can be branched to many other group jobs. which govern the execution of a job? Ans:Run time priority and Time slice What is Sub-System? Ans:Sub-Systems are specific user defined partitions of the CPU where various jobs may be executed. and subsystem monitor jobs. What is LDA? Ans:LDA is created by the system for each job in the system. Group Job is useful in enhancing the programmers productivity. What is a message file? Ans:It is a file which contains the messages of an application. What is an ICF file? Ans:A device file that allows a program on the system to communicate with program in other system. length of a LDA? 15 . The message related to the requests. thus preventing other users from processing at the same time. What is a job log? Ans:A record of request submitted to system be a job. The system program maintains it. What are the two main attributes. What is Group Job? Ans:A Group Job is attached to one workstation and a user. * Supports externally described files. Group Data Area (GDA). A data area can be locked to a single user. jobs started on the system by a reader. What are the types of data areas? Ans:User defined Data Area. Disk. message queues.
How to change file attributes such as size. *DLT. What are the functions of Remote Job Entry (RJE) ? Ans:Allows user of AS/400 system to submit jobs and receive jobs from a host system. How to create a data queues? Ans:Using CRTDTAQ command. . 1024 bytes What is GDA? Ans:The system creates a GDA when an interactive job becomes group jobs. These record images 16 . What is the use of OVRPRTF ? Ans:Override with Printer file (OVRPRTF) command is used to override certain parameters of the printer files used in the program or to replace the printer file. Data Queues are used in Program to program communication. *ALL. and Logical What are the two types of read performed on data queues? Ans:Read with lock. file wait time. *OBJEXIST. What are the valid data types in Data Queue? Ans:Char. record wait time etc. *READ. *EXCLUDE. or device file. Only one GDA can exists for group. *UPD. and read without lock. What is class of service ? Ans:A set of link and node characteristics associated with a session. How can a data area be locked after being updated? Ans:Using OUT *LOCK What is the use of Data Queues? Ans:Data queue is a type of system object that you can create. *ADD. How do you use DEBUG utility? Ans:STRDBG program-name UPDPROD(*YES) What is an authorization list? Ans:A lists of two or more user Ids & their authorities for system resources. How to see active jobs of the system. Ans:Using WRKACTJOB command How do you detect unused spool storage? Ans:Using Reclaim Spool Storage. *OBJMGT. diskette.Ans:*CHAR. permanently? Ans:Using CHGPF command What is the use purpose of CRTCMD? Ans:To create user defined command. The system identifies it an object type *AUTL How do you grant authority? Ans:Using GRTOBJAUT command What are the types of object authorities? Ans:*USE. *OBJOPR How do you put jobs in batch mode? Ans:SBMJOB What is the use of OVRDBF ? Ans:You can use the Override with Database file (OVRDBF) command to replace the database file named in a CL program or to change certain parameters of the existing database file. What process the command SBMRJEJOB does? Ans:Sends RJE input stream to host system What is journaling & Commitment Control? Ans:Journaling is a function which records the changes in a file in a journal. *CHANGE. What is the function of RJE Conversion Utility? Ans:It converts compressed data written to an AS/400 database file to decompressed data written to another AS/400 database. Numeric.
What is the default value for the number of increment for the physical file? Ans:Three When does the DFT keyword in PF be used? Ans:To specify the default value it a field. How to create a user defined (general) data area? Ans:Using CRTDTAARA command What are the different ways to input data into data area? Ans:CHGDTAARA (using CL) Using OUT opcode in RPG How to retrieve data from data area? Ans:Using RTVDTAARA command in CL.are used to recover the changes in the file should the system ends abnormally. What is the use of *PSSR in the program? Ans:Whenever there is any type error in the program the control straight away passes onto this subroutine. it is a system-defined subroutine it is executed automatically. Commitment control is a function that allows you to define and process a number of changes to database files as a single unit (transaction). 17 . Use of Data Structures? Ans: · Dividing a field into sub fields. What are the different definition levels in Data Description Specifications? Ans:File level. journal and PFs to be journalled. What is Subroutine in RPG? Ans:A subroutine is a group of statements in a program that can be processed several times in that program. Using IN opcode in RPG Difference between CALL & SBMJOB? Ans:CALL performs interactively job while SBMJOB performs batch job. How to run other job when one job is active? Ans:Change the priority or rename the job. Do we have to Execute the *INZSR compulsory? Ans:No. Select/Omit level. · Changing the format of a field. Keyfield level. What is the purpose of STRCMTCTL command? Ans:Starts commitment control for files that are being journalled. Field level. What is an access path? Ans:The order in which the database fields are organized for processing in the program. What are all the different types of access path? Ans:Arrival sequence access path. Maximum number of Records in Display File? Ans:1024 What does VLDCMDKEY means? Ans:Valid Command Key. Record level. Keyed sequence access path.Compile Time Tables Pre-Runtime Tables What is the error if we don’t get login screen? Ans:There is some problem with subsystem. A Physical File contains data. What the difference between Source Physical File and Physical File? Ans:A Source Physical File contains the source for the various objects created this file has specific structure. Types of Tables in RPG? Ans:There are 2 types of tables in RPG they are: . Join level. and the record format can be different for different physical files. What are the system objects required for journalling? Ans:Journal receiver.
Types of Data Structures? Ans: a. How can we know the CPU utilization of the server? Ans:WRKACTJOB (Work with active job) WRKSYSSTS (Work with system status) Which are the libraries (system) always present in the library list? Ans:QTEMP & QGPL Which users are allowed to manipulate system libraries? Ans:QSECOFR & QSYSOPR What is a Join Logical File? Ans:A Join Logical File combines information from two or more physical files into one record format. Data Queue. Library. File Information Data Structure. How do you place or remove locks on the objects? Ans:*AACOBJ & *DLCOBJ Some of the object types on which locks can be allocated? Ans:Data Area. c. Menu &Program. How many triggers can be associated with a single PF? Ans:6 (max) Can the objects stored in the product library be modified? Ans:No. Multiple Occurrence Data Structure. Program Status Data Structure. · Defining an area of storage in more than 1 format. Date Area Data Structure. 18 . d. b. e. User Defined Data Structure. How many types of objects are there on As/400? Ans:80 How is data stored in PF’s? Ans:In fixed length records. Join Logical Files have always one record format. Which is the subsystem that is always on till the main power switch is off? Ans:QCTL What is the command to shutdown the As/400 Server? Ans:PWRDWNSYS & Parameter *IMMED. What is the opcode to release all the locks on a particular PF? Ans:UNLCK What is a trigger? Ans:A trigger is an action that automatically occurs whenever a change Is made to a physical file. What is Subfile? Ans:A Subfile is a temporary area in memory which records may written to & read from a display file device.*EXCL : Only the routing step holding the lock can use the object *EXCLRD : Routing step can read/update the file other jobs can only read. Message Queue. Give an example of DEFN opcode? Ans:*LIKE DEFN ENAME $ENAME (Now the $ENAME has all the attributes same like ENAME) What is DBMS? Ans:A DBMS is a software system that controls the creation. Types of Object Locks & what they do? Ans:There are mainly 3 types of locks they are as follow: . File. *SHRUPD : All jobs can read/update the object.· Grouping non-contiguous data in a contiguous format. organization & modification of a database & access to the date stored within it.
What does print writer do? Ans:It is a system job that selects files from the output queue & prints Them on a printer. What does print writer do? Ans:It is a system job that selects files from the output queue & prints Them on a printer. The members in LF contain? Ans:Access Path. What does the members in a Source Physical File contain? Ans:Source statements for a program. they simply position to the record. What is a table? Ans:A table is collection of data elements in one column. Give the Table definition? Ans:TABMT 1 12 2 A Where 1 = Number of entries per record 12 = Total number of entries 2 = Length of each entry A = Ascending Sequene If the data is likely to change over a period of time & Moreover data is large than which type of table is preferred? Ans:Compile Time Table. It provides the interface between output queue’s Spooled files & the printer. Does the SETLL & SETGT retrieve the record? Ans:No.How can we know the triggers associated with the PF? Ans:DSPFD with parameter TYPE (*TRG) How can we add & remove trigger to a PF? Ans:ADDPFTRG & RMVPFTRG What is an Output Queue? Ans:They are the holding areas that store printed output generated from Batch programs or Interactive applications. What is a Compile Time Table? Ans:We can hard code data within the program is said to be Compile Time Table. data elements Must be of same type and same length. Can a Subroutine contain another Subroutine? Ans:No. How can we add & remove trigger to a PF? Ans:ADDPFTRG & RMVPFTRG What is an Output Queue? Ans:They are the holding areas that store printed output generated from Batch programs or Interactive applications. What are the 2 types of lines on O Specs? Ans:Record Identification Line & Field Identification Line. The members in a PF contain data? (True/False) Ans:True What is the command to view the library list? Ans:DSPLIBL What is the command to create PF? Ans:CRTPF The LF is associated with how many PF’s? Ans:At least one PF at a time. 19 . It provides the interface between output queue’s Spooled files & the printer. What is a Run Time Table? Ans:Data from a separate disk file is loaded into a table each time the Program runs.
only difference is DFU program allows you to add & update selected fields. Library on the bottom of the library list & Current library? Ans:Current library While designing the screen user wants to add file level keywords then which function key is pressed? Ans:F14 While designing the report using RLU user wants to add record level keywords which function key is pressed? Ans:F18 If user wants to add one field on the report then which function key is pressed? Ans:F11 If user wants to center the company name on his report then which command will be used? Ans:CF (Center Field) SEU shows prompt/syntax checking according to? Ans:Member Type It is possible to run Query using RUNQRY command? Ans:YES Using Query it is possible to create level break report? Ans:YES Using DFU user can do which operation? Ans:Add. it uses the concept of Alternate Table. Update & Select fields What is the difference between UPDDTA to PF & updating using DFU? Ans:Both are same. the data elements must be of same Length and same type. Which function key should be pressed to define hidden field while you are working with SDA? Ans:F4 20 . To store information in multiple columns. When a spooled file is created. The Qualified name for an object ORDPF residing in a library TRAINING is? Ans:TRAINING/ORDPF The function key to start SEU session through program development manager is? Ans:F6 The Member type for an RPG & CL program which SEU supports is? Ans:RPG & CLP Printed output items placed in an output queue are known as? Ans:Spool Files. Library QGPL.What is Alternate Table? Ans:RPG tables stores information in 1 column. it is placed into an? Ans:OUTQUEUE The command to display a list of spooled files? Ans:WRKSPLF Change in the externally described file does not require recompilation of the program? Ans:False Command to display current library is? Ans:DSPCURLIB A PF can have how many record formats? Ans:Only one Which one of the following has the highest priority Library on top of the library list. What is an Array? Ans:Array is a collection of data.
What is the size of the filename in RPG? Ans:8 Characters (Max. RLU: If user wants to define new numeric field on record format then which line command will be used? Ans:VF Maximum report length is 132. What if RPG. What are the different File Designation Types in RPG? Ans:P (Primary) & F (Fully Procedural) What’s the use of File Designation in RPG? Ans:It refers to the way program will access or retrieve the data from the file.) Which are the different File Types in RPG? Ans:I (Input). currency symbol etc. What is I Specs for? Ans:To describe the records within Program described file. What are the different File Format Types in RPG? Ans:F (Fixed Length) & E (Externally Described) What is the use of File Format in RPG? Ans:It tells to the program that the records are within the program (F) or outside the program (E). divide fields into sub 21 . SFLDSP.Which function key should be pressed to watch all string defined on SDA screen? Ans:F20 While designing the screen using SDA. which function key should be pressed to get the field from the FRF? Ans:F10. SFLCTL & SFLPAG If user wants to change the length of the numeric field defined in the report then which combination of the keys will be used? Ans:F23 & F10 What is the difference between SKIPB (2) & SPACEB (2)? Ans:SKIPB (2) skips 1 page & on the next page after skipping 2 lines space print next while SPACEB (2) skips 2 lines space before printing. Write system defined function used to place system name on the screen? Ans:*SYSNAME While designing screen F3 function key is kept common for all record formats on which level should it be defined? Ans:File level Write down mandatory keywords used when defining a subfile? Ans:SFL. constants. SFLSIZ. if user is designing a report using RLU? Ans:FALSE (Maximum is 378) What is full form for DDS? Ans:Data Description Specification What are members? Ans: Members are separate entities within a database file & they are components of As/400 object. when & who invented it? Ans:Report Program Generator is IBM introduced a High Level Language in 1960. U (Update) & C (Combine). O (Output). fields. date separator. which purpose is H Specs used? Ans:Writing header information. What is L Specs for? Ans:To tell length of page & number of lines to be printed on a page. From WRKMBRPDM screen you have to modify existing member-using SDA which option do you select? Ans:17. For.
Define what a data queue is along with a brief example of what it may be used for? Ans:Data queues provides communication between programs by calling API's QSNDDTAQ and QRCVDTAQ along with parameters like data queue name. Example: a new and unique customer number is generated whenever a new customer is added to customer master file. the control transfers to the statement below the ENDDO. Define the purpose of the LEAVE operation? Ans:If you specify LEAVE. CPYF FILE (ORDHDR) TOFILE (ORDHIST) CRTFILE (*YES) c. CPYF FILE(ORDHDR) TOFILE(ORDHIST) b. We can send the same data queue to the many programs. What is the purpose of the following? I 'CLOSED' C STAT01 I 'OPEN' C STAT02 Ans:It is a type of initializing the variables in I-spec. List the steps/commands necessary to accomplish the following: a. If the file ORDHDR does exist. The format is *MDYY (MMDDYYYY). The format is *MDY (MMDDYY). List some of the commonly used commands for debugging Ans:STRDBG(for batch jobs). Describe the difference between the DOWxx and DOUxx operations? Ans:DOWxx : If the condition becomes true. The file ORDHIST may or may not exist c. then only the group of instructions allowed executing. and these are further used in C-spec. Define the RCVF command? Ans:RCVF command used to receive the records either from the data base file or device file. it will execute at least one time. The file ORDHIST may or may not contain data. variable to store the number of characters to be sent. if the file does contain data the old data should be erased Ans:Commands are as follows a. What are Data Structures? Ans:Data Structures define an a storage & layout of fields within the defined structure. How many maximum spaces could be given in O Specs? Ans:3 Which are Control Break Logic indicators? Ans:L1 – L9. it may or may not contain data d. variable to store the information to be sent. Copy data from the file ORDHDR into file ORDHIST b.fields & to form a group of fields. Define the purpose of the ITER operation? Ans:If you specify the ITER. DOUxx : Irrespective of condition. What is the difference between UDATE and the system date? Ans:UDATE supports two-digit year. Through program we can access new customer number. library in which data queue exists. *DATE (system date) supports four digit year. the groups of statements are allowed to execute repeatedly. Define the purpose of the %SST function? Ans:To extract the information from the specified string. Define the purpose of the *BCAT function? Ans:To concatenate the two strings by placing a single blank in a resultant. STRISDB. Define the purpose of the *CAT function? Ans:To concatenate the two strings into a one string. CPYF FILE (ORDHDR) TOFILE (ORDHIST) *ADD 22 . Data area keeps track of last record added and add 1 to it. Define what a data area is along with a brief example of what it may be used for? Ans:Data area is a storage area to store limited information.
READE To read the equal key records c. Where as /COPY is compiler directive statement. How can you check for a records existence without causing and I/O (CHAIN/READ)? Ans:With the help of File Information Data Structure. 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. Define what the operation will do. READC To read the records from the workstation file (Subfile). we can make specified subfile record format inactive. Define each of the following operation codes a. Define the purpose/use for SFLRNA? Ans:Using this. how would this be written in RPG ILE) 23 . the program will not compile. The code is described below: In File description continuation line (IPFK). Define the purpose of the following code (If you know. The letter "U" indicates that the defined data structure is a data area data structure.d. the purpose of the result field and the purpose of *IN66? HI LO EQ C CALL 'CVTDAT' DTPRM 66 Ans:The above statement causes. What is the purpose of the following I UDS I 1 60ORDER# I 7 90LINE# Ans:The purpose is to define the variables in I-Spec and these are further used in C-spec. READP To read the previous records d. we can use the above steps. b. What is the purpose of the following?A CSRLOC (F1ROW F1COL) Ans:Using this record level keyword. we can check existence of records in a physical file. Hence we have to rename either of the file. call the program and pass the parameter. What is the difference between SFLCLR and SFLINZ? Ans:SFLCLR : It clears the subfile. REDEP To read the equal key previous records.ORDERR During the compilation the source code of ORDERR copy book is copied into the existing program. e. $2SFN is a relative record number and FMT2 is name of the subfile record format. SFLINZ : First it clears the subfile and initiliazing the numeric variables with zeros and alphanumeric variables with characters. The program sends output after setting the cursor location. CPYF FILE (ORDHDR) TOFILE (ORDHIST) *REPLACE What is the purpose of the following? FORDHDR1 IF E K DISK ORDHDRF KRENAMEORDHDRF1 Ans:In order to rename the record format of a data base file in a program. Purpose of renaming is: If the record format name is similar in two files and if both are used in a same program. you can specify cursor location on an output operation to the record format you are defining. What is the purpose of the following Ans:C/COPY QRPGSRC. What is the purpose of the following Ans:FORDHDR1 CF E WORKSTN $2SFN SFILE FMT2 The above line indicates that. READ To read the records sequentially. Where as ‘U’ indicates data area data structure? The above code is used to update the data area value through the program.
HI LO EQ C *IN66 DOUEQ *OFF C KEY1 CHAIN FILEA 90 66 C 66 CALL PGM1 PRM C ENDDO Ans:Whenever the indicator *IN66 becomes *OFF. Otherwise. If the specified indicator on LO position becomes *OFF.0? Ans: C MOVE *ZEROS FLDA C Z-ADD *ZEROS FLDA C Z-ADD 0 FLDA C MOVE *ALL'0' FLDA C SUB FLDA FLDA C MOVE '0000' FLDA C CLEAR FLDA C MOVE *BLANKS FLDA The last instruction does NOT zero the field FLDA. it reads the records from the data base file based on indicator specified on HI position. What is the purpose of the "N" in the following calculation specification? Ans:C KEY CHAIN FILE N 99. we can select the records from the data base file. The process involves following steps: Steps: 1. e. What is *INZSR used for? Ans:It is special type of RPG/400 subroutine. when the same file of type " U" used in different programs. OPNQRYF 3. How can you execute a command from within an RPG program without calling a CLP program? Ans:By calling QCMDEXC application program interface we can execute a CL command with in an RPG program. CLOF 24 . we can store the Different values in same variables at various stages. OVRDBF with SHARE (*YES) 2. What is the difference between array and a multiple occurrence data structure? Ans:The values stored in array don’t vary. .34 columns in a printer file. high volume check producing process that needs to select only records that are flagged to be processed? Ans: With the help of OPNQRYF Clp command. How would you design the process for a nightly. Which of the following operations does NOT zero the field FLDA defined as 4. It is a good place to code initializes the variables. CALL the program 4. Generally it will happen. This indicator automatically set on whenever overflow occurs on a type of page. Define a shared access path? Ans:To share the open data path by various programs in a same job. How do you set the keywords SFLSIZ and SFLPAG if you want the subfile to dynamically expand? Ans:SFLSIZ > SFLPAG. the control transfers after ENDDO statement. DLTOVR 5. It is a way of avoiding the record lock. the program will ended abnormally. which is executed automatically at beginning of the program. How can you detect overflow for a print program that prints multiple lines per cycle? Ans:You specify the indicators OA through OG and OV in 33 . How can you detect and handle a record lock situation? Ans:If you try to read the locked record. We can use at all the times. In the other hand. the record will not be locked if you try to read the locked record. With the help of File Information Data Structure we can handle record lock situation.If you specify 'N' in 53rd position. we can get system defined message i. then only CALL statement will execute. When would you use or not use this approach? Ans:It is the most desirable method in building a real time applications.
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. Define a Job Queue? Ans:Job queues are queues of batch jobs waiting to be processed. ' 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 When PGMA calls PGMB for the first time PGMB executes the *INZSR. Describe the function of SETLL operation in RPG language? Ans: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. a first name. When PGMA call PGMB the second time is the *INZSR executed? Ans:If you specify RETRN in called program. 25 . the indicator specified in EQ comes *ON. The source code in CLP is given below: PGM DCL VAR(&VAR1) LENGTH(6) TYPE(*CHAR) VALUE('YYMMDD') DCL VAR(&RCVD) LENGTH(6) TYPE(*CHAR) DCL VAR(&VAR2) LENGTH(4) TYPE(*CHAR) DCL VAR(&VAR3) LENGTH(2) TYPE(*CHAR) CHGVAR VAR(&VAR2) VALUE(%SST(&VAR1 3 4)) CHGVAR VAR(&VAR3) VALUE(%SST(&VAR1 1 2)) CHGVAR VAR(&RCVD) VALUE(&VAR2 *CAT &VAR3) SNDMSG MSG(&RCVD) TOUSR(*USRPRF) ENDPGM Define the purpose of Factor 1 the Operation Code and *IN15 in following code HI LO EQ C *YMD Test(D) yymmddDate 15 Ans:If the factor 1 value matches with factor2 value. 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) Ans: MOVE 'Dr. the *INZSR will not execute again. Describe the function of SETGT operation in RPG language? Ans: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 purpose of Level Check parameter in a Physical file? Ans:Specifies whether the level identifiers of the record formats in the physical file are checked when the file is opened by the program. What is the function of CPYSPLF command? Ans:It copies the spooled file to the data base file. Define a Output Queue? Ans:Output queues are queues of jobs waiting to be printed.How would you join 3 separate fields. What is the function of CPYF command? Ans:To copy the data from the one file to another. PGMB uses the RETRN operation to return to PGMA. What is the function of CRTDUPOBJ command? Ans:To create the replica from the original object.
What are different types of Substems? Ans:QBATCH. 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 26 . In the data area data structure. Define a Batch Job? Ans: * A user request the job. QSPL. What is the purpose of Data structure? Ans: * 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. Overrides gives you the flexibility to use existing model files and dynamically change their attributes. * The job is created (job name is assigned. letter "U" must be entered to define the data structure as a data area data structure. QINTER. * Output generated by the batch job is placed on an output queue.Define Subsystem? Ans:Subsystem is nothing but it provides specialized environment to complete the execution of jobs. What is the CLP command to access a Query/400? Ans:WRKQRY What is the purpose of Overrides? Ans:The basic purpose of Overrides is to temporarily change the attributes of a file. * The spool sub system prints the output on the output queue. QCMN. job attributes are allocated) * The job is placed on a job queue * The sub system QBATCH takes the job from job queue and starts it. QBASE. * File information data structure A file information data structure provides exception/error information that may be occurred when processing a file during program execution. List and explain the different type of data structures? Ans: * Data area data structure When the data area is defined in an RPG/400 program as a data area data structure. its data is implicitly retrieved for processing and written back at the end of the program. A query report can be: * displayed on a workstation (screen) * printed * stored in another database file. Define Data Structure? Ans: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. QCTL. So you don't have to create permanent files for every combination of attributes your application might need. Describe about Query/400? Ans: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.
Since access paths created by open query files are temporary. Exception errors may be controlled by testing for an error code in the *STATUS field which is included in a file information data structure. Specifically. keywords including *FILE. If you specify this in a file level. Note that any code greater than 00099 is flagged as an exception/error. *STATUS. applications that use an access path frequently will be more efficient using a logical file. creating and using a logical file will allow an application to perform faster than using an open query file. the system doesn't perform record selection until the program reads file. 27 . Then on the Select/Omit criteria. What is the purpose of DYNSLT keyword? Ans:This is a file level keyword used in a logical file. Four keywords . *RECORD.*STATUS. it selects the records from the specified file. *ROUTINE. *PARMS are supported by a program status data structure. since the access path will not have to be rebuilt every time the file is open. * Program status data structure Program status data structure however identity exception/errors that are generated in the program by RPG/400 operations and not by a file.* The RPG/400 routine in which the error occurred. When would you prefer logical file than OPNQRYF? Ans:The physical file you are working with very large. *ROUTINE provide the previously named information. *PROGRAM. *OPCODE.
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue listening from where you left off, or restart the preview.