This action might not be possible to undo. Are you sure you want to continue?
To share the open data path by various programs in a same job. 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. 3. What is *INZSR used for? 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. 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. 5. What is the purpose of the "N" in the following calculation specification? 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. 6. Which of the following operations does NOT zero the field FLDA defined as 4,0? 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. 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 records in a physical file. The code is described below:
11. library in which data queue exists. STRISDB. Define the purpose of the *CAT function? To concatenate the two strings into a one string. 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. *DATE (system date) supports four digit year. Data area keeps track of last record added and add 1 to it. Define the purpose of the %SST function? To extract the information from the specified string. 12. variable to store the number of characters to be sent. 13. What is the purpose of the following? I 'CLOSED' C STAT01 I 'OPEN' C STAT02 It is a type of initializing the variables in I-spec. 10. 14. 8. List some of the commonly used commands for debugging STRDBG(for batch jobs).In File description continuation line (IPFK). 9. The format is *MDY (MMDDYY). . variable to store the information to be sent. 15. and these are further used in C-spec. 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. We can send the same data queue to the many programs. What is the difference between UDATE and the system date? UDATE supports two-digit year. Through program we can access new customer number. Define the RCVF command? RCVF command used to receive the records either from the data base file or device file. The format is *MDYY (MMDDYYYY). 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.
it may or may not contain data d. Define the purpose of the LEAVE operation? If you specify LEAVE. CPYF FILE (ORDHDR) TOFILE (ORDHIST) *ADD d. What is the purpose of the following? FORDHDR1 IF E K DISK ORDHDRF KRENAMEORDHDRF1 In order to rename the record format of a data base file in a program. the control transfers to the statement below the ENDDO. CPYF FILE (ORDHDR) TOFILE (ORDHIST) *REPLACE 21. the program will not compile. If the file ORDHDR does exist. then only the group of instructions allowed executing. Hence we have to rename either of the file. List the steps/commands necessary to accomplish the following: a. CPYF FILE (ORDHDR) TOFILE (ORDHIST) CRTFILE (*YES) c. we can use the above steps.16. 17. Define the purpose of the ITER operation? If you specify the ITER. it will execute at least one time. . DOUxx : Irrespective of condition. Describe the difference between the DOWxx and DOUxx operations? DOWxx : If the condition becomes true. 18. if the file does contain data the old data should be erased Commands: a. CPYF FILE(ORDHDR) TOFILE(ORDHIST) b. 20. Copy data from the file ORDHDR into file ORDHIST b. The file ORDHIST may or may not contain data. The file ORDHIST may or may not exist c. 19. the groups of statements are allowed to execute repeatedly. Purpose of renaming is: If the record format name is similar in two files and if both are used in a same program. Define the purpose of the *BCAT function? To concatenate the two strings by placing a single blank in a resultant.
ORDERR During the compilation the source code of ORDERR copy book is copied into the existing program. the purpose of the result field and the purpose of *IN66? . What is the purpose of the following 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. SFLINZ : First it clears the subfile and initiliazing the numeric variables with zeros and alphanumeric variables with characters. What is the purpose of the following? A CSRLOC (F1ROW F1COL) Using this record level keyword. Where as /COPY is compiler directive statement. 25. Define what the operation will do. 28.spec. 26. 24. 23. Define the purpose/use for SFLRNA? Using this. we can make specified subfile record format inactive. 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. Where as U indicates data area data structure? The above code is used to update the data area value through the program. What is the purpose of the following FORDHDR1 CF E WORKSTN $2SFN SFILE FMT2 The above line indicates that. What is the purpose of the following C/COPY QRPGSRC. What is the difference between SFLCLR and SFLINZ? SFLCLR : It clears the subfile. 27. The letter "U" indicates that the defined data structure is a data area data structure. $2SFN is a relative record number and FMT2 is name of the subfile record format.22.
32. 33. Define each of the following operation codes a. 34. b. 30. e. the program will ended abnormally. it reads the records from the data base file based on indicator specified on HI position. How can you detect overflow for a print program that prints multiple lines per . Generally it will happen. READE To read the equal key records c. When would you use or not use this approach? SFLSIZ > SFLPAG. READC To read the records from the workstation file (Subfile). If the specified indicator on LO position becomes *OFF. call the program and pass the parameter. How do you set the keywords SFLSIZ and SFLPAG if you want the subfile to dynamically expand? SFLSIZ > SFLPAG.HI LO EQ C CALL 'CVTDAT' DTPRM 66 The above statement causes. When would you use or not use this approach? It is the most desirable method in building a real time applications. the control transfers after ENDDO statement. READ To read the records sequentially. e. . when the same file of type " U" used in different programs. 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. 31. We can use at all the times. READP To read the previous records d. REDEP To read the equal key previous records. 32. Define the purpose of the following code (If you know. 29. Otherwise. With the help of File Information Data Structure we can handle record lock situation. How can you detect and handle a record lock situation? If you try to read the locked record. then only CALL statement will execute. we can get system defined message i.
How would you design the process for a nightly. This indicator automatically set on whenever overflow occurs on a type of page.34 columns in a printer file. high volume check producing process that needs to select only records that are flagged to be processed . 35.cycle? You specify the indicators OA through OG and OV in 33 .
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.