what is the use of UNIQUEUE KEY WORD?
what is the difference between PFILE AND REF?

Answer Posted / vp86

unique keyword is file level keyword you can use physical file as well as logical file also if you use the unique keyword then you prevent the duplicate value in particular filed and one more necessary condition file should be keyd.

pfile : That keyword is logical file keyword its record level keyword through we can create the logical file .

syntax for that keyword : pfile(physical file name).

ref: this keyword is file level keyword we can use only taking the field attribute reference .
syntax for that keyword :ref(lib/file/rcdname)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

which type of object is used in db2/400?

645


what is message file?

596


an access path may be in which sequence?

631


what is the difference between sflclr and sflinz?

1031


what is xfoot opcode ?

1050






what is maximum number of arrays allowed in rpg?

1182


using dfu, user will be able to ___________ from physical file?

577


is there any way I can ease my rpg controls on numeric input fields? How about an input date field?

608


what are the different opcodes available in rpg for database access ?

807


I need to insert a record in a file using STRSQL containing the some field values same as an already existing record in that file.I know to smple insert mentioning those values one by one.But is there any another query can be prepared for the same .Please share the query if known to you. Thanks in advance.

2262


Hi,Can any body give the code for the below mentioned quetion.?Im trying to get coding in with easily inderstanding.Plese give me the coding for this? 1.How would you achieve this requirement with out using RPG/RPGLE pgm,but by using only CL?Read a database file and display file contents on the screen when enter key pressed the next record should be displayed on screen.When the last record is reached or when F3 key is pressed the program should exit if the file is empty,a message should be displayed indicate that there are no records to display. Database file Name=EMPDBF Fields in EMPDBF to be displayed on screen Employee Number- EMPNUM(5,0) Employee Name- EMPNAM(30,A) Employee Address-EMP ADDR(50 A)

1736


which are the query selection criteria, which can be given in a query?

667


what is the use of dspatr(mdt) keyword?

1441


what is the maximum number of subroutines allowed in rpg?

1054


what are the different commands used in rlu ?

1452