Link to home
Start Free TrialLog in
Avatar of sniger
sniger

asked on

locking files

RPG PROGRAM A, opens 30 files, it calls a CL which is Calling another CL, which tries to clear those files. It can not clear the because RPG still has them in the stack
ASKER CERTIFIED SOLUTION
Avatar of Gary Patterson, CISSP
Gary Patterson, CISSP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sniger
sniger

ASKER

Thanks Gary,  how about putting everything in one activation group (CALLER activation group)


would this help ?
Reasonable thought, but no not in this case.  Try it - it is what? - about 5 lines of code?

Rpg:

Fmyfile if              e disk
c                     read  myfile
c                     call 'TESTCLEAR'
c                     eval *INLR = *ON

Open in new window

TESTCLEAR (Clle)

clrpfm myfile

Open in new window


CLRPFM requires a system-side exclusive lock.  That means no locks on this file by anything in this job - same activation group or different activation group - or any lock in any other job on the system, either.