i would like to know under what circumstance the object
will get locked on AS400.
Answers were Sorted based on User's Feedback
Answer / abhishek kumar
In most of the cases files(*file) will be locked.
Reason: If any program is using that particular file.
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / samul
File object locked when file open in update mode or file
allocated excl in cl using cmd ALLOBJ.
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / sankar prosad mohanta
Abhishek is correct, but we can avoid this file locking,
specifying 'N' in 53 position of File Description Spec,
where the file is defined in the program.
| Is This Answer Correct ? | 6 Yes | 2 No |
Answer / keshar jain
@Shankar:
We can use N on position 53 in CHAIN if file is in Update
mode. For other mode we can't specify N.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / ravi
When a file is declared in UF mode. U - Update, F - Fully procedural file.
When you do a read, it locks the particular record making it unavailable for any other programs. This is to protect the data integrity.
Once you do the update, the lock will be released. If you do not want the lock, you can specify Read(N), but you cannot update. You can also UNLCK opcode to release the lock.
Also, each time you update, you need to lock it.
If you do ALCOBJ you can lock it exclusively. This will not even allow basic functions on the object like read/display. And vice versa too. Any *SHRRD locks like read/display will not allow exclusive lock.
| Is This Answer Correct ? | 2 Yes | 0 No |
Have a join logical file with more than one members with different record formats. So how can we read the different members from this file and also how we can read the different record format from the join logical?
can i use unique key in LF
What is the RPG cycle?
what is use of sflnxtchg and use of MDT(modify data tag).both r same r not and can we use these on dspf and subfile.
how do I declare a minor?
what is EXCEPT command in rpg and use
what are the array operations?
i want to perform uniqness on db file bt my db file nt hving key by useing rpgle.
3 members in a databasefile .how to read records from all the members?????????
How can read PF in reverse order (end to start) in CL pgm..
Need a sql query: retrive all duplicate records in table
RPG/400 faqs?