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

3. Given the DOS Specification below and the following information: • Indicator 50 is off • No records have been written to the subfile What will be the result if the EXFMT operation code is performed on the record format CTLR? A R SUBFL A DESCRIP 101 6 1ODSPATR(UL) A DFT(’NOT FOUND’) A R CTLR SFLCTL(SUBFL) A N50 SFLDSP A SFLDSPCTL A SFLINZ A 67 SFIJEND A SFLSIZ(13) A SFLPAG(12) A ACCOUNTNO 100 S 10 a.) Only AccountNo will display b.) SUBFL will be initialized with 13 blank records c.) An I/O exception error will occur d.) The screen will display 12 records with ‘NOT FOUND’

4 Answers   IBM,


can any one help in hawkeye and turnover or any change management system plzzzzz or send the documents to my mail id :gvsp.as4@gmail.com

0 Answers  


what is edit word and edit code

0 Answers   Cap Gemini,


When it is desirable to describe files Internally?

0 Answers  


why we do STRSRVJOB in batch debugging in as400

1 Answers  






Can any one plz explain the concept of INFSR, *PSSR, INFDS AND PSDS, I' confusing about PSDS and *PSSR, Wat is the difference btw them, wat PSDS will do????

1 Answers  


Assume 2 users are using the same file and first user updates some record in the file. Will the 2nd user will be able to see the updated record or not?

0 Answers  


what do you mean by SESSION/DEVOCE ERROR?

1 Answers   IBM,


How we will read call stack?

4 Answers  


How to find d key field of a pf that doesn’t have source physical file?

2 Answers  


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?

3 Answers  


RPG/400 number of Records present in a physical file using file information data structure FPF001 IP E DISK F KINFDS INFDS1 IINFDS1 DS I *RECORD RECORD Is this coding correct sir,i have given I P E that is I- input,P-primary file,E-externally described. Primary to use RPG logic cycle,is this the correct method because we have to find number of records present using file information data structure in RPG/400 without doing any input/output operations on the file and also without using DSPFD,SQL. If the above coding is correct means,when i compile the program it gets compiled,but if i call the program it does not return anything,i need number of records,please complete the coding sir.

1 Answers   IBM,


Categories