this is kind of complicated but...
before clearing the file in rpg, have your rpg program call a cl program that does this command
WRKOBJLCK OBJ(library / filename) OBJTYPE(*FILE) output(*print) , then copy the spoolfile to a physical file. cpysplf. and have your rpg program read the physical file to see if there are locks and what the locking jobs are. If necessary, you can then call a cl program to end the locking jobs, disable the user profiles, and reenable them after your program is finished. I used to do that in a backup job stream.
Last Wiki Answer Submitted: September 24, 2008 3:52 pm by philpl1jb44,220 pts.
All Answer Wiki Contributors: philpl1jb44,220 pts.