Jeff Powell wrote:
> Thanks again to everyone for all their help. I'm almost
there.
> 
> I want to use the VOC pointer so I created the pointers in
my Live and
> Test VOC files, logged out and back in to ensure I was
reading VOC but
> I'm still not meeting with any success. When I attempt to
> reference the
> pointer I get a "Unintialized Variable" warning during
compile and 0
> (zero) assumed error during execution. The path looks like
> "0/MTR01040600nn.ROW" 
> 
> LIST VOC F1 F2 F3 VERTICAL "MFG.DATA.IPS.TMP" 16:27:26 Jan
04 2006 1
> VOC   MFG.DATA.IPS.TMP
> F1    DIR
> F2    /tmp/MFG.DATA.IPS.TEST/tmp
> F3    D_VOC
> 
>         GOSUB GET.MTR.COUNTER
>        
MTR.REC="MTR":OCONV(DATE(),"D2/"):OCONV(MTR.CTR,"MR%4"):".ROW"
>         CONVERT "/" TO "" IN MTR.REC
> * -- The following line fails to compile
>         MTR.FILE.PATH=MFG.DATA.IPS.TMP

Jeff,

You have set up MFG.DATA.IPS.TMP as a VOC pointer, but if
you reference it in BASIC without quotes, the compiler
thinks it is an unassigned variable.

So, step one, wrap the name of your VOC pointer in quotes.

However, you've said you want to use VOC pointers instead of
paths, so instead of appending a "/" and the record name,
you want to OPENSEQ the VOC name "," the record name.

So, step two, use the VOC,record syntax, not the path
syntax:

OPENSEQ MFG.DATA.IPS.TMP,MTR.REC TO MTR.REC.VBLE ELSE
* remember in UniData, OPENSEQ creates automatically
WEOFSEQ MTR.REC.VBLE
END

Other points:

1) It really isn't a great idea to go creating application
specific subdirectories in /tmp.  Fill /tmp up with junk and
the system will crash sooner or later.

2) If you need the path of an opened file variable use
FILEINFO().

Cheers,

Ken
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to