i would like to know under what circumstance the object
will get locked on AS400.
Answer Posted / 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 |
Post New Answer View All Answers
1. If there are two programs using same file and 2 users are using the file at the same time and what can be done to allow them both to access? 2. How can remove lock from the file for accessing it by both users?
how do I play {insert rpg system here}?
If my rpg program has a date field, what extra care I have to take while compiling that rpg program? If the file is keyed and I have declared the file as well as key list properly in my program. Still am getting an error message like "chain/reade operation is not allowed" what may be the case?
How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique
How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?
What is file identifier where we can use?
How to handle duplicate error handling in RPG?
We have job which is running as batch. It takes atleast 06 hours to complete tht job. But I wanna do tht job with in 3 hours?
explain sflclr, sflend, sfldlt, and sflcsrrrn?
what is the procedure and explain about real time scenario.
What is ment by record level identifier?
Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg
give an eg of ACQ-(ACQUIRE),BIT OFF,BIT ON,DEALLOC,DUMP,FEOD,FORCE,MHHZO,MHLZO,MHLLZO,MLHZO,REL,RESET,TESTZ,TESTB,TESTN----GIVE SMALL EXAMPLE TO THE OPCODES...TO UNDERSTAND FUNCTIONING...........
how can I tell when to replace the array?
How to select highest score of each subject or how to select highest income of every month?