Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ames!ucbcad!ucbvax!rayssd.ray.COM!m1b From: m1b@rayssd.ray.COM.UUCP Newsgroups: mod.computers.vax Subject: Creating Logical Names from VAX C Message-ID: <839@rayssd.RAY.COM> Date: Thu, 9-Apr-87 11:34:39 EST Article-I.D.: rayssd.839 Posted: Thu Apr 9 11:34:39 1987 Date-Received: Sat, 11-Apr-87 15:14:28 EST Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: "M. Joseph Barone" Distribution: world Organization: Raytheon Company, Portsmouth RI Lines: 52 Keywords: VMS V4.4, C V2.2, need help Approved: info-vax@sri-kl.arpa I am trying to create a logical name in my process table from within a C program. I am using SYS$CRELNM. SYS$CRELOG is obsolete so I don't want to use that. LIB$SET_LOGICAL works fine but I want to know what I am doing wrong. I am running VMS V4.4 using C V2.2. Here is a sample program that does not produce the logical name NEWNAME. Strangely enough, it exits with SS$_NORMAL. Can someone who has successfully used this system service help me out? Thanks. ---- Snip here ---- #include descrip #include lnmdef #include psldef #define MAXLEN 100 main() { extern unsigned long sys$crelnm(); unsigned char acmode = PSL$C_USER; unsigned long attr = 0; long status; char defname[MAXLEN]; char logname[MAXLEN]; struct { struct { short len; short code; long *baddr; long *rladdr; } log; long eos; } loglst = { { MAXLEN, LNM$_STRING, defname, 0}, 0 }; $DESCRIPTOR(LOGNAME,logname); $DESCRIPTOR(TABLE_NAME, "LNM$PROCESS_TABLE"); strcpy(defname, "abc.xyz"); strcpy(logname, "NEWNAME"); TABLE_NAME.dsc$w_length = strlen("LNM$PROCESS_TABLE"); loglst.log.len = strlen(defname); LOGNAME.dsc$w_length = strlen(logname); status = sys$crelnm(&attr, &TABLE_NAME, &LOGNAME, &acmode, &loglst); exit(status); } Joe Barone ---------------------------> m1b@rayssd.RAY.COM {cbosgd, gatech, ihnp4, linus, mirror, uiucdcs}!rayssd!m1b