From: system@SendSpamHere.ORG Sent: Thursday, April 26, 2001 6:08 AM To: Info-VAX@Mvb.Saic.Com Subject: Re: DCL To Compute IP Address From Hex Number ? In article <7lLF6.1779$%L5.31592@insync>, LESLIE@209-16-45-102.insync.net (Jerry Leslie) writes: >I'm modifying some DCL scripts to work with TCP/IP V5.1. >The following command used to get the IP address: > > $ ip = f$getjpi("","tt_accpornam") > >but now gets: > > $ show symbol ip > IP = "Host: OLYSC2 Locn: _RTA1:/VECTOR" > >My current plan is to use the hex value of the IP address which >makes up part of the value of the SYS$REM_ID logical; e.g.: > > $ ip = f$extract(8,8,f$trnlnm("sys$rem_id")) > > $ show symbol ip > IP = "5B71B34" > >Has someone already written a DCL procedure to convert such >hex values to IP addresses acceptable to TCP/IP V5.1 ? > >Thanks in advance, > >--Jerry Leslie leslie@209-16-45-97.insync.net > leslie@209-16-45-102.insync.net is invalid > (my opinions are strictly my own) This should work: $ a[0,32]= 'F$integer(IP) $ a= "''F$fao("!UB.!UB.!UB.!UB",F$cvui(0,8,a),F$cvui(8,8,a),F$cvui(16,8,a),F$cvui(24,8,a))'" -- VAXman- OpenVMS APE certification number: AAA-0001 VAXman(at)TMESIS(dot)COM city, n., 1. a place where trees are cut down and streets are named after them.