Ans:SFLCLR : It clears the subfile. SFLINZ : First it clears the subfile and initiliazing the numeric variables with zeros and alphanumeric variables with characters.
Define the purpose/use for SFLRNA?
we can make specified subfile record format inactive.
What is the purpose of the following
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. Where as ‘U’ indicates data area data structure? The above code is used to update the data area value through the program. The letter "U" indicates that the defined data structure is a data area data structure.
What is the purpose of the following?
A CSRLOC (F1ROW F1COL)
Ans:Using this record level keyword, you can specify cursor location on an output operation to the record format you are defining. The program sends output after setting the cursor location.
Define what the operation will do, the purpose of the result field and the purpose of *IN66?
HI LO EQ
C CALL 'CVTDAT' DTPRM 66
Ans:The above statement causes, call the program and pass the parameter.
Define each of the following operation codes
a. READ To read the records sequentially.
b. READE To read the equal key records
c. READP To read the previous records
d. READC To read the records from the workstation file (Subfile).
e. REDEP To read the equal key previous records.
Define the purpose of the following code (If you know, how would this be written in RPG ILE)
HI LO EQ
C *IN66 DOUEQ *OFF
C KEY1 CHAIN FILEA 90 66
C 66 CALL PGM1 PRM
Ans:Whenever the indicator *IN66 becomes *OFF, the control transfers after ENDDO statement. Otherwise, it reads the records from the data base file based on indicator specified on HI position. If the specified indicator on LO position becomes *OFF, then only CALL statement will execute.
How do you set the keywords SFLSIZ and SFLPAG if you want the subfile to dynamically expand?
Ans:SFLSIZ > SFLPAG.
When would you use or not use this approach?
Ans:It is the most desirable method in building a real time applications. We can use at all the times.
How can you detect and handle a record lock situation?
Ans:If you try to read the locked record, we can get system defined message i. e. , the program will ended abnormally. With the help of File Information Data Structure we can handle record lock situation. Generally it will happen, when the same file of type " U" used in different programs.
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 - 34 columns in a printer file. 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.
What is the difference between array and a multiple occurrence data structure?
Ans:The values stored in array don’t vary. In the other hand, we can store the
Different values in same variables at various stages.
What is *INZSR used for?
Ans:It is special type of RPG/400 subroutine, which is executed automatically
at beginning of the program. It is a good place to code initializes the variables.
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.
What is the purpose of the "N" in the following calculation specification?
Ans:C KEY CHAIN FILE N 99.If you specify 'N' in 53rd position, the record will not be locked if you try to read the locked record. It is a way of avoiding the record lock.