i)What is the command to lock a file in a program
ii)2. Can you get a level check error in a CL program

Answers were Sorted based on User's Feedback



i)What is the command to lock a file in a program ii)2. Can you get a level check error in a CL pro..

Answer / vaibhav gupta

For 2) If a file is declared in Cl pgm we can get a level
check error in the CL pgm.

Is This Answer Correct ?    15 Yes 1 No

i)What is the command to lock a file in a program ii)2. Can you get a level check error in a CL pro..

Answer / naveen chandra joshi

The questions asked are:
i)What is the command to lock a file in a program?

ii)Can you get a level check error in a CL program?

Answers:
1) ALCOBJ,

2) Yes,if the file is declared in CL program then we can get Level Check error in case of record level identifier mismatched. I have tried this in the system and then only posting over here.

Regards,
Naveen Chandra Joshi.
+91.9891501280.

Is This Answer Correct ?    5 Yes 0 No

i)What is the command to lock a file in a program ii)2. Can you get a level check error in a CL pro..

Answer / avinash

1) ALCOBJ
2) No,not in CLP

Is This Answer Correct ?    5 Yes 3 No

i)What is the command to lock a file in a program ii)2. Can you get a level check error in a CL pro..

Answer / saravan

1) We can lock by using ALCOBJ command. To know about
object locks, use WRKOBJLCK file_name.
2) As every thing (File name, variable) will be taken as
parameter and path will be created each time in CL, we
won't get any level check error.
In RPG/LE, the level Id will be mapped to the program and
so we will get level check error.

Is This Answer Correct ?    3 Yes 1 No

i)What is the command to lock a file in a program ii)2. Can you get a level check error in a CL pro..

Answer / ss

in CL , level check is not handle

Is This Answer Correct ?    1 Yes 3 No

i)What is the command to lock a file in a program ii)2. Can you get a level check error in a CL pro..

Answer / rakesh

1.wenever u use a keyword USROPN in rpg pgm ,ten u r locking
tat file......
2. we wont get level check errors in clle..

Is This Answer Correct ?    1 Yes 8 No

Post New Answer

More RPG400 Interview Questions

What is SFLNXTCHG keyword why it has used and where? Briefly explain with Example.

2 Answers   IBM,


Thanks gagan for your answer,i'm new to as400,i don't know embedded sql in rpg.can you send me the coding for the below mentioned question in embedded sql rpg. how to retrieve particular field records from a physical file,say i have a physical file called 'employee' in it i have to retrieve the records of a field 'admin' present in pf 'employee' using rpg,but i should not use logical file or openquery file.

2 Answers   iGate,


I know chain keyword retreive records randomly but how chain keyword exactly works internally????

4 Answers  


1.String operatio such as moving the characters to the variables? 2.what are the building functions for check file longs? 3.which of the following methods will make externally describe file fields available to a program? A: A/copy statement that specifies the library file and member of the field reference file source code B: A data structure definition specification that names the file on the EXTNAME keyword C: A data structure definition specification that names the file on the IMPORT keyword? D: A Definition specification for each desired field with the REFFLD keyword

1 Answers   CSC, CTS,


1.Write code to read the records from a file and load an array of size 99? Make sure that you take care of all the error conditions?

2 Answers   HSBC,






How can we search particular records from the database file in RPG. For example, there are 100 records in the file.i need to retrieve all the records matching/equal to the particular 'NAME' field. How can we do the above using SEARCH criteria other than using the IF cond?

4 Answers   CTS,


i have a file with the values 10, 20, 30, 40, if am setll with the value 25 then readp, so what it will return?

6 Answers   Mind Tree,


1.Suppose my file has 10 fields and I want to make the 2nd field Zeros in all records. And assume I have millions of records and I dont want to read each record and update the desired field with 0. Any other way to do this in one step operation? 2. Assume my file has 100 records and I want to see only first 10 records. Is this possible through LF? 3.I have 3 jobs A B and C. I want to submit B after successful completion of A and want to submit C after successful completion of B. Without using job scheduler or job queue, how can i do that through CL program? 4.What is difference between Bind by copy and bind by reference?

4 Answers   Virtusa,


What will be your approach in going either for OPNQRYF or Logical files. Which one to go for?

2 Answers  


how can you display specific subfile page on the screen in unequal subfile?

0 Answers   IBM,


Can an indexed file be accessed in arrival sequence in RPG?

3 Answers  


I have a Physical File name 'File1', which is present in two libraries named 'LIB1' & 'LIB2'. These 2 libraries are listed in the library list. Would like to access data from this file from these two libraries using RPG program. How to do this, any idea?

4 Answers  


Categories