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 |
how to convert date format from one format to another i think in CL/400 its CVTDAT,Please tell in RPG/400 sir not in RPGILE
Suppose my file has 10 fields and I want to make the 2nd field zeros in all records. And assume I have millions of records and I dont want to read each record and update the desired field with 0. Any other way to do this in one step operation?
Is it possible to call a subfile using CL. IF yes.. kindly help me out with explanation...?
list down and describe the sub systems vailable
What are different ways to pass data between programs and which one is the efficient way?
what is the rpg system?
IN RLU what are the record level keyword is used?
how can we can we the data decimal error?how can we open such file in support
are there any useful c runtime apis that I can call from rpg iv?
Please help me, I have created window subfile,I have created Footer with same lengh and postion of window SFL. When I call the pgm, first is shows only Footer and then it shows subfile records.This time Footer is not showsing ..plz hel me how can i do it...? Sameple DDS and RPG: A R WIN1 SFL A*%%TS SD 20090130 165346 MUNSHIJ REL-V4R2M0 5769- PW1 A FLD001 1Y 0B 4 3EDTCDE (Z) A ATFILE R O 4 7REFFLD (QWHFDBAS/ATFILE LIB/LIBF- A ILE) A R WINCTL SFLCTL (WIN1) A*%%TS SD 20090202 123459 MUNSHIJ REL-V4R2M0 5769- PW1 A ALTNAME ('y') A SFLSIZ (0004) A SFLPAG (0004) A WINDOW (FOOTER) A ROLLUP (27) A ROLLDOWN (28) A CF12 (12 'Cancel') A 50 SFLDSP A N51 SFLDSPCTL A 51 SFLCLR A 1 2'Select Option,Press enter' A 2 3'1= Select' A R FOOTER A* A WINDOW(8 31 9 43) A 8 4'F12 = Cancel' A R DUMMY ASSUME A 24 10' ' in RPG: Dow *IN12 = *Off Write Footer Fxfmt WInCTL
How to update only a field of a PF in an RPG program. I don't want to update the record, only one field.
do you use message subfiles? What are the necessary keywords required coding a message subfile?