I want to lock a file exclusively for a job (no updates/no read from any other job till my job completes). If some one is else is trying to use the file, then i want to send a Message to the User who is trying to use the file. These are the lines of code by which i am trying to do it.
I have a interactive program (CL which calls a RPG) and then again submits a Job which uses the INVOICE file. I want to know whether i can allocate the file in my 1st CL program (At a time only 1 person should run this Job). How do i achieve this?
I have a interactive program (CL which calls a RPG) and then again submits a Job which uses the INVOICE file. I want to know whether i can allocate the file in my 1st CL program (At a time only 1 person should run this Job). How do i achieve this?




. I made a big mistake initially. I allocated a object in CL program 1 and the same file was used in CL Program 2 (submitted from CL1). I din't understand what i was doing for some time
. Till i commented out the SBMJOB and called program 2 interactively...
Comment