Page 1 of 1

How to add entry in VOC file

Posted: Fri May 04, 2007 12:57 am
by soumik
Hi All,

I am trying to unlock the job from the Datastage shell. It is giving an error as:

Verb "DS.UNLOCK" is not in your VOC.

Is it possible to add an entry into this file? If yes please guide me. Let me know if you require any more information.

Posted: Fri May 04, 2007 1:18 am
by nick.bond
Pretty sure you don't want to enter entry into VOC.

You may be looking for CLEAR.LOCKS that clears all your users locks. Be careful with it though!!!

LIST.LOCKS should list the locks.

Posted: Fri May 04, 2007 1:26 am
by soumik
Hi Nick,

CLEAR.LOCKS would clear all the locks but I want to unlock a particular job.
Previously I used to go to the dssh shell and then give
"LIST.READU EVERY" | grep $JOBNAME
from that I find the userno. and atlast I give the UNLOCK command
"DS.UNLOCK USER $USERNO ALL"

I used to pass the jobname as a parameter. This was working fine in the previous DataStage 6.0.1 environment but it is not working in the current DataStage 7.5.2 environment.

So please guide.

Posted: Fri May 04, 2007 2:01 am
by nick.bond
as you said run $DSHOME/bin/uvsh to get to the command line

LOGTO youProject

DS.TOOLS

choose option 5 - Administer Processes/Locks and follow the instructions.

Posted: Fri May 04, 2007 2:14 am
by kumar_s
Or you can create an entry in VOC

Code: Select all

SET-FILE UV VOC UV.VOC
COPYI FROM UV.VOC TO VOC 'UNLOCK'

Posted: Fri May 04, 2007 2:18 am
by ray.wurlod
That's not the same as the DS.UNLOCK entry, though. Or is it? :roll:

Executing an unlock command from the DS.TOOLS menu will catalog the UNLOCK command into your VOC file without your needing to risk corrupting the VOC file with any external operation.

Posted: Fri May 04, 2007 3:04 am
by soumik
Hi Nick,

As you said, I tried that before. See the output

DataStage Process and Lock Administration

1. List all processes
2. List state of a process
3. List state of all processes in a job
----------------------------------------------
4. List all locks
5. List locks held by a process
6. List locks held by all processes in a job
----------------------------------------------
7. Clear locks held by a process
8. Clear locks held by all processes in a job
----------------------------------------------
9. Logout a process
10. Logout all processes in a job
11. Clear status file for a job

Which would you like? ( 1 - 11 ) ?6
Enter job name or <CR> for list=J1
Job J1 does not have a status of 'Running'.
Its status is currently 'Finished'. OK to continue? (N):Y
Processes for job J1 are or were:
24751 = sc_EndContInput.CurrentCycleHash.IDENT1 (Finished)
Press any key to return to the menu...
24794 = x2 (Finished)
sc_EndContInput.VerifyDateFormat (Finished)
sc_EndContInput.CheckProcess (Finished)
sc_EndContInput.BuildStartProcStats (Finished)
24957 = sc_EndContInput.BuildEndProcStats (Finished)
====================Locks held by process 24751 (user# -1)====================
No locks or semaphores active.
====================Locks held by process 24752 (user# -1)====================
No locks or semaphores active.
====================Locks held by process 24794 (user# -1)====================
No locks or semaphores active.
====================Locks held by process 24957 (user# -1)====================
No locks or semaphores active.


The output shows that all the locks are released, but actually they are not. I could still see that jobname from option 4:
4. List all locks

This is why I was trying using the DS.UNLOCK command from the dssh shell.

Posted: Fri May 04, 2007 3:08 am
by soumik
Hi Kumar,

I have given the commands to enter the VOC entry:

>SET-FILE UV VOC UV.VOC
Q-pointer written to VOC file.
>COPYI FROM UV.VOC TO VOC UNLOCK
Record "UNLOCK" already exists in file "VOC"; not COPIED
It is saying that UNLOCK already exists in the file.

When I am executing the command of unlock:
echo "Unlocking all locks for user number $USERNO"
./bin/dssh "DS.UNLOCK USER $USERNO ALL"
See the output :

Unlocking all locks for user number 39564
Verb "DS.UNLOCK" is not in your VOC.


Please suggest.

Posted: Fri May 04, 2007 6:35 am
by ray.wurlod
Read through everything above again. Then forget about DS.UNLOCK - it does not exist. Use UNLOCK.

Posted: Sat May 05, 2007 2:56 am
by kumar_s
Are you trying any progmatical approach? If not you can acheive the same using Cleanup resourses option available in Director.