i would like to know under what circumstance the object
will get locked on AS400.

Answers were Sorted based on User's Feedback



i would like to know under what circumstance the object will get locked on AS400...

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

i would like to know under what circumstance the object will get locked on AS400...

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

i would like to know under what circumstance the object will get locked on AS400...

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

i would like to know under what circumstance the object will get locked on AS400...

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

i would like to know under what circumstance the object will get locked on AS400...

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

Post New Answer

More RPG400 Interview Questions

is this a rpg channel?

0 Answers   IBM,


HI,1: What is the function of 'SETON LR' AND '*INLR=*ON ? 2:Can we used "seton lr" OR "*INLR = *ON" in between the program code ? 3:if yes then according to there function the code which is written acter seton lr/ *inlr should not be execute . Can any one tell me why those code get executed ?

2 Answers  


How can a screen field that has changed since the last output operation be detected?

4 Answers   IBM,


HOW DO YOU DISPLAY A DISPLAYFILE AT OTHER WORKSTATION? CAN WE MOVE A PHYSICAL FILE? WITHOUT MOVING A FILE?

2 Answers  


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

1 Answers  






Q:Hi all,i want accurate answer with code using in built functions.please sent me code as soon as posible. I have program nmed PGM1 which '' RETRIEVE Current production date''should correctly default the production date for the user who is issuing raw materials to the manufacturing.The production date can be different from the celendra date. However, the program does not make the correct adjustment for all manufacturing plants. there is a parameter which determines the production start time e.g. 07:00 if the system time precedes this,the program subtracts one from the celendra day.This work fine when the celendar day starts after production day as it does in England,the system should be adding one to the celendar day during the overlap. unfortunately the program was desined to assumed the celendar day always starts before the production day. Change required in the program: Change the PROGRAM PGM1 to use the new parrameter to decide whether to add or subtract 1 from the celendar day when determining the production date.

0 Answers   TCS,


1) How to declare a file? 2) How to define a display file? 3) How to monitor error messages in RPG? 4) How to find the attributes for subfiles? and what is the DDS for subfiles?

2 Answers   TCS,


what is mean by *MAP and *DROP?what commands use these two keywords?why are they used?

4 Answers  


how can we find setll setgt chain read reade readp operations are successfull or not,give example.explain in detail.

4 Answers   iSoft, Wipro,


HI, 1: WHAT IS THE FUNCTION OF %KDS?WITH PROGRAMMING CODES EXAMPLE 2: WHAT IS THE FUNCTION OF Z-ADD AND Z-SUB ? WITH PROGRAMMING CODES EXAMPLE

1 Answers   IBM,


How to print output from openquery in as400 ?

1 Answers   Four soft,


what is the difference between do while and do until?

0 Answers   IBM,


Categories