Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

use of synchronize in pipe command

 
SOLVED
Go to solution
Highlighted
Valued Contributor

use of synchronize in pipe command

Hi,

I am trying to spawn a submit command and wait for the completion of the batch job from a C program. But for some reason I am unable to synchronize on the created batch entry. The following illustrates the problem from DCL.

$ sho sym $entry
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
$ pipe submit/user=system t.com ; sho sym $entry ; sync/entr='$entry'
Job T (queue ITIV29_BATCH, entry 1085) started on ITIV29_BATCH
$ENTRY = "1085"
%DCL-W-VALREQ, missing qualifier or keyword value - supply all required values
$ sho sym $entry
$ENTRY = "1085"
$ sho entr 1085
Entry Jobname Username Blocks Status
----- ------- -------- ------ ------
1085 T SYSTEM Executing
On available batch queue ITIV29_BATCH
$

Any idea as to why the sync command doesn't get the value of the $entry symbol?

Thanks,

Oswald
20 REPLIES 20
Highlighted
Honored Contributor

Re: use of synchronize in pipe command

hi,

use the /symbol qualifier to preserve the symbols through the pipe.


HTH

Highlighted
Honored Contributor
Solution

Re: use of synchronize in pipe command

/SYMBOL should be default, try a

SAP01_Roh. pip/sym sub/noprint/keep sc:a.com ; sh sym $entry ; synch /ent=&$entry
Job A (queue SAP01_BAT_QUE_7_1, entry 127) started on SAP01_BAT_QUE_7_1
$ENTRY = "127"

Job A (queue SAP01_BAT_QUE_7_1, entry 127) completed
SAP01_Roh.

instead.

regards Kalle
Highlighted
Valued Contributor

Re: use of synchronize in pipe command

Hi Mark,

According to help /symbol is default. Anyway i tried both pipe/symbol and pipe/nosymbol and the results are the same.

The weird thing is that the 'show symbol' command does show the $entry symbol while the 'sync' command apparently gets an empty string. Hence the VALREQ message.

Oswald
Highlighted
Valued Contributor

Re: use of synchronize in pipe command

Hi Karl,

Yes that's it. Thanks for your reply.

Still don't really understand as to what is happening here.

Oswald
Highlighted
Honored Contributor

Re: use of synchronize in pipe command

'$entry' will be resolved at parsing the pipe command, therefore it is empty (or would contain any old entry number).

You have too use the & substitution:

; sync/entr=&$entry

and it will work.
http://www.mpp.mpg.de/~huber
Highlighted
Valued Contributor

Re: use of synchronize in pipe command

Hi Joseph,

Yes that explains it. Thanks.

Oswald
Highlighted
Trusted Contributor

Re: use of synchronize in pipe command

Oswald,

Take a look at chapter 12.13 in Users Manual.
http://h71000.www7.hp.com/doc/731final/6489/6489pro_033.html#syn_phases

It's about how/when DCL do symbol substitutions.

/Hakan
Don't make it worse by guessing.........
Highlighted
Honored Contributor

Re: use of synchronize in pipe command

Sorry Karls answer dived under my browsers cache.

The explanation:
The ' ' symbol substitution happens in the early DCL parsing phase (of the PIPE command): its value (or not existence) is taken at the beginning of the pipe command, before anything is executed.

The & substitution happens a stage later, when the sync command is parsed: at that time the $entry symbol has already the new value.
http://www.mpp.mpg.de/~huber
Highlighted
Valued Contributor

Re: use of synchronize in pipe command

Yep its clear to me.

Thanks all.