As400 Faq
As400 Faq
As400 Faq
2. What is the difference between array and a multiple occurrence data structure?
The values stored in array don¶t vary. In the other hand, we can store the
Different values in same variables at various stages.
4. How can you execute a command from within an RPG program without calling a CLP
program?
By calling QCMDEXC application program interface we can execute a CL command with
in an RPG program.
7. How can you check for a records existence without causing and I/O (CHAIN/READ)?
With the help of File Information Data Structure, we can check existence of
KINFDS RCDS
IRCDS DS
I *RECORD #RCDS
with the above code we can check the existence of records in a file without
causing I/O operation.
8. Define what a data area is along with a brief example of what it may be used
for?
Data area is a storage area to store limited information.
Example: a new and unique customer number is generated whenever a new customer i
added to customer master file. Data area keeps track of last record added and add
1 to it. Through program we can access new customer number.
9. Define what a data queue is along with a brief example of what it may be used
for?
Data queues provides communication between programs by calling API's QSNDDTAQ and QRCVDTAQ along with parameters
like data queue name, library in which data queue exists, variable to store the number of characters to be sent, variable to store
the information to be sent. We can send the same data queue to the many programs.
I 'CLOSED' C STAT01
I 'OPEN' C STAT02
It is a type of initializing the variables in I-spec. and these are further used
in C-spec.
11. What is the difference between UDATE and the system date?
UDATE supports two-digit year. The format is *MDY (MMDDYY).
*DATE (system date) supports four digit year. The format is *MDYY (MMDDYYYY).
RCVF command used to receive the records either from the data base file or device
file.
17. Describe the difference between the DOWxx and DOUxx operations?
DOWxx : If the condition becomes true, then only the group of instructions allowed
executing.
If you specify LEAVE, the control transfers to the statement below the ENDDO.
If you specify the ITER, the groups of statements are allowed to execute
repeatedly.
C/COPY QRPGSRC,ORDERR
During the compilation the source code of ORDERR copy book is copied into the
FORDHDR1 CF E WORKSTN
I UDS
I 1 60ORDER#
I 7 90LINE#
The purpose is to define the variables in I-Spec and these are further used in C- spec. Where as µU¶ indicates data area data
structure? The above code is used to update the data area value through the program. The letter "U" indicates that the defined data
structure is a data area data structure.
Using this record level keyword, you can specify cursor location on an output
operation to the record format you are defining. The program sends output after
setting the cursor location.
26. What is the difference between SFLCLR and SFLINZ?
SFLCLR : It clears the subfile.
SFLINZ : First it clears the subfile and initiliazing the numeric variables with
zeros and alphanumeric variables with characters.
28. Define what the operation will do, the purpose of the result field and the
purpose of *IN66?
HI LO EQ
C CALL 'CVTDAT' DTPRM 66
The above statement causes, call the program and pass the parameter.
29. Define each of the following operation codes
30. Define the purpose of the following code (If you know, how would this be
written in RPG ILE)
HI LO EQ
C *IN66 DOUEQ *OFF
C KEY1 CHAIN FILEA 90 66
C 66 CALL PGM1 PRM
C ENDDO
Whenever the indicator *IN66 becomes *OFF, the control transfers after ENDDO 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.
31. How do you set the keywords SFLSIZ and SFLPAG if you want the subfile to
dynamically expand?
It is the most desirable method in building a real time applications. We can use
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.
34. How can you detect overflow for a print program that prints multiple lines per
cycle?
You specify the indicators OA through OG and OV in 33 - 34 columns in a printer file. This indicator automatically set on
whenever overflow occurs on a type of page.
35. How would you design the process for a nightly, high volume check producing
process that needs to select only records that are flagged to be processed