Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!pasteur!ucbvax!ANDREW.CMU.EDU!mm5l+ From: mm5l+@ANDREW.CMU.EDU (Matthew Mashyna) Newsgroups: comp.os.vms Subject: Re: Using the $trnlnm system service from c Message-ID: Date: 19 Jan 88 21:28:01 GMT References: Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 72 [An Andrew/BE2 view (ctextview) was included here, but could not be displayed.] This is the C code I use to translate logical names. This only works for the first logical symbol defined. There are ways to specify what table to use; you can find it in the SYS$ manuals. ------------------------------ Cut Here----------------------------- struct descriptor { short len, code; char *address; long junk; }; trnlnm(log,tran) char *log,*tran; { struct descriptor lname,trans; char *p; unsigned status; strupr(log); lname.len=strlen(log); lname.code=1; lname.address=log; lname.junk=0; trans.len=15; trans.code=1; trans.address=tran; trans.junk=0; status=LIB$SYS_TRNLOG(&lname,0,&trans,0,0,0); p=strchr(tran,32); if(p) *p=0; } ------------------------------ Cut Here-----------------------------