What are the three types of keywords associated with printer file ?
Ans:File level, Record level & Field level.
Difference between SFLRCDNBR and SFLNXTCHG
Ans:SFLRCDNBR will give the RRN of the First record displayed on the screen at a given time.
Whenever a record is changed on display file. An MDT is set ON. If an indicator is associated with SLFNXTCHG and it is SETON then READC will read only the changed record. And if the indicator is not associated and it is seton it READC reads all the records from sub-file
How can see logical file based on which physical file and vice versa
How can u check no of records in a file
How do u compile RPGLE program
Ans:Either thru 15 or crtrpgmod
Is module executable
Ans:No You need to create an RPG prog to run the module.
How do you combine two record formats in RLU ?
What are the different commands used in RLU ?
Ans:DR - Define Record, CLC - Change Line for Continuation, CLR - Change Line for Record, SD - Create Sample Data, VF - View Fields, NP - New Page, DC - Define Constants, DF - Define Fields, CF - Centre Fields & SP - Space Fields evenly.
What is the command used to invoke RLU ?
What are different record spacing keywords in RLU ?
Ans:SKIPA, SKIPB, SPACEA & SPACEB.
Mandatory keywords of sub file
Ans:SFL, SFLCTL, SFLDSP, SFLSIZ, SFLPAG are the mandatory key words
What is procedure?
Ans:A procedure is the set of self-contained high level language statements that can perform a particular task and then returns to a caller
What is service program?
A Service Program is a collection of runnable procedures and available data items easily accessible by other ILE programs. In many respects it is similar to a subroutine library and procedure library.
A service program differs from a program in two ways:
It does not contain a program entry procedure. This means that you cannot call a service program using the CALL operation.
A service program is bound into a program or other service programs using binding by reference
What is LOKUP opcode?
Ans:Look’s for a particular element of an array
How many files, printer files you can describe in a RPG
Ans:50 files and 8 printers
How do handle file exception/error
Ans:*INFDS ,*PSSR defining it in F spec
Distinguish between terminating a program through SETON LR and RETURN?
Ans:LR closes all the files used in the program and RETURN is used to return the control to the parent program.
How will you add a field to physical file already containing data?
Ans:With CPYF command and *NOCHK & *DROP
What are the uses of FACTOR1, FACTOR2 and RESULT field for the RPG operation code PARM?
Ans:It is add value of FACTOR1 to FACTOR2 or compare the value of FACTOR 2 with FACTOR1.
How will you find a string using PDM?
Ans:By using FNDSTRPDM.
How will you search an array?
What are the different types of arrays?
Ans:Preruntime gets populated at the time input. Runtime gets populated at the time execution.Compile time gets populated at the time of compilation.
What is message file?
Ans:It is file which contain messages created by the user through which a user can display own message while validating.
What does DEFN do?
Ans:It is used to define a field based on the value specified in FACTOR 1.
What are two types of record are used in subfile?
Ans:SUBFILE RECORD FORMAT and SUBFILE CONTROL RECORD FORMAT.
What are DDS required for SUBFILE?
Ans:SUBFILE DISPLAY (SFLDSP) SUBFILE DISPLAY CONTROL (SFLDSPCTL) SUBFILE CLEAR (SFLCLR) SUBFILE SIZE (SFLSIZE) SUBFILE PAGE (SFLPAGE).
What is ELASTIC and NON ELASTIC SUBRILE?
Ans:When subfile size is greater then subfile page size it is called elastic subfile and when subfile size is equal to subfile page size it is called non-elastic subfile.
What is SFLINZ and SFLRNA?
Ans:SFLINZ stands for subfile initialize. It initialized all the character field as blanks and numeric fields as zeros. SFLRNA stands for subfile record not active (It means records are there in the subfile but active).
Can you display a empty subfile?
Ans:Yes by using the keyword SFLINZ and SFLRNA.
Why do we use READC? What is SFLNXTCHG?
Ans:READC is to read those records which have changed in the subfile. If you validate a record in subfile on some condition all the invalid records can display in reverse image. The first which have changed and made valid and released still displaying in reverse image. The records have read even it has not been changed due to SFLNXTCHG.
How do you read changed records backward in subfile?
How you will find an error which is not in the first page of the subfile without using ROLLDOWN key?
Ans:By using keyword SFLRCDNBR.
What is SFLROLVAL?
Ans:By using this keyword you can tell system to roll on of records when the user presses ROLLDOWN key (For this you define a hidden of 4 byte).
How you will know whether you are in SFLDROP or SFLFOLD mode?
Ans:By using the keyword SFLMODE.
How you get the relative record in a subfile in which cursor is located?
Ans:By using the keyword SFLCUSRRN (Subfile cursor relative record number).
What is QCMDEXC?
Ans:It is used to execute a single CL command within the RPG program.
What is OPNQRYF, MONMSG commands
It is Dynamically creation of access path, and it can have resultant fields i.e. if the expression is A = B + C then B and C are from the file while A is defined in OPNQRYF. We can divert the output of command to an OUTFILE. Command associated with OPNQRYF is CPYFRMQRYF to save the output permanently
It is a CL command to monitor and error/exception message so that in case of an error a dump is avoided and the control is in program. It is also used to monitor user message.