Operating System - OpenVMS
1752815 Members
5843 Online
108789 Solutions
New Discussion юеВ

Re: Perl and awk result to a symbol/logical?

 
labadie_1
Honored Contributor

Re: Perl and awk result to a symbol/logical?

>>>And since the job logical table space is rather small, one should take care to deassign the logical after use!

So

$ mysymb = f$trnlnm("mylogical","lnm$job")
$ deas/job mylogical
Joseph Huber_1
Honored Contributor

Re: Perl and awk result to a symbol/logical?

One addition:
when using the perl $ENV{myvalue} method, don't blindly expect to have the logical MYVALUE defined, it could well be a global DCL symbol (or nothing at all if perl defined a local DCL symbol).
To make sure perl creates the right entity independent of the installation or system setup:

$ define/user PERL_ENV_TABLES CLISYM_GLOBAL
or
$ define/user PERL_ENV_TABLES LNM$FILE_DEV
before invoking perl.
Then $ENV() generates DCL symbols resp. logical names.
http://www.mpp.mpg.de/~huber
Joseph Huber_1
Honored Contributor

Re: Perl and awk result to a symbol/logical?

and for results needed only inside a DCL procedure, a local symbol is appropriate:

define/user PERL_ENV_TABLES CLISYM_LOCAL
perl -e "$ENV{result} = sprintf(""testing result"")"
sh sym result
RESULT = "testing result"
http://www.mpp.mpg.de/~huber