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

suppose if we want to update the data in cl what we will do?

9 Answers  


One of the job in subsystem is in Running status,expected time to complete this job is 2 minutes. But from last 5 -10 minutes this job is still in running status....What are the possible reasons...and What are the actions i need to perform to check this...?

4 Answers  


How to read a record from file where there is multiple record occurrence is available?

1 Answers  


parameters cannot be passed in which one???

4 Answers   CTS,


1.If *HIVAL SETGT is used what opcode is used to read a record? A:READ B:READPE C:CHAIN D:READP 2.How to pass numeric parameter to the rpg pgm from the command line? 3.What keyword is used on the rpg 4 definition specification to rename a subfile in an externally definition data structure? A:RENAME B;LIKE C:EXTNAME D:EXTFLD

4 Answers   Manhattan,






Im traying to get out put of this below mention simple logic code.But im geting out of different.(im trying with my laptop trhough my company server. DCL &FIELD1 *CHAR 10 VALUE('TCS AS/400') DCL &FIELD2 *CHAR 10 CHGVAR(%SST(&FIELD2 1 10))(%SST(&FIELD1 10 1) Can you tell me the value of field2 after excuted of CHGVAR command.

2 Answers  


How to set on/off a group of indicators in a single statement?

3 Answers  


What is significance of a file designated as a Primary file in Rpg400 program....also what's use of secoundry file

1 Answers  


How do you find whether a record is locked or not?

2 Answers  


1.Where we declare Variables in RPG/400,RPGIV,RPGILE.? 2.When do we use D-spec and I-spec in real time ?.what is difference between them?

1 Answers   HP,


i want to retrieve record b/w 2 dates in as400

2 Answers   L&T,


In how many ways a session/device error occurs,,, and what is the remedy for it?

3 Answers  


Categories