Nancy:
Little things like this are really slowing down my progress, but I am
learning a lot about Linux and GTM in the process.  Getting a little déjà vu
of the early days in VistA.  The only FileMan doc was, I think, 20 pages
long (but, as George T will attest), everything was there, you only needed
to know where to look.  We would call him up, he would say (without
looking), "page 18, on the bottom, there in the example".

Here is my origional hosts file, right after installation of Redhat 9:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost

GTM>D GETENV^%ZOSV
hostname: Unknown host
 
GTM>ZWRITE
Y="VAH^ROU^^ROU:"
 
GTM>

Here is the “hosts” file as it is now.
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       ROU     x1-6-00-e0-18-62-af-ec

GTM>D GETENV^%ZOSV
 
GTM>ZWRITE
Y="VAH^ROU^ROU^ROU:ROU"
 
If I take out the third field, leaving only two, 
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       ROU

GTM>D GETENV^%ZOSV
hostname: Unknown host
 
GTM>ZWRITE
Y="VAH^ROU^^ROU:"

Now change only the “hosts” middle field to AAA, to avoid confusion
GTM>D GETENV^%ZOSV
 
GTM>ZWRITE
Y="VAH^ROU^AAA^ROU:AAA"
 
GTM>



Here is the code in ^%ZOSV, you can see what the problem is, the -s argument
tells GTM to retrieve the shortname from the hosts file, and it doesn't work
if there is no longname.  What name it gets, I think MUST correspond to
Volume Set, in order for things to work right.  I think also, Volume Set
should be three letters.

GETENV  ;Get environment Return Y='UCI^VOL^NODE^BOX LOOKUP'
        N %HOST,%V S %V=^%ZOSF("PROD"),%HOST=$$RETURN("hostname -s")
        S Y=$TR(%V,",","^")_"^"_%HOST_"^"_$P(%V,",",2)_":"_%HOST
        Q

RETURN(%COMMAND) ; ** Private Entry Point: execute a shell command & return
the resulting value **
        ;
        ; %COMMAND is the string value of the Linux command
        N %VALUE S %VALUE="" ; value to return
        N %FILE S %FILE=$$TEMP_"RET"_$J_".txt" ; temporary results file
        ZSYSTEM %COMMAND_" > "_%FILE ; execute command & save result
        O %FILE:(REWIND) U %FILE R:'$ZEOF %VALUE C %FILE:(DELETE) ; fetch
value & delete file
        ;
        QUIT %VALUE ; return value
 ;


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nancy E.
Anthracite
Sent: Saturday, November 20, 2004 4:45 AM
To: [EMAIL PROTECTED]
Subject: Re: [Hardhats-members] Volume Sets

Please show me the output of GETENV....  and hostname -s and what Linux 
distribution are you using?  ROU is usually the volume set.  I am using 
Fedora Core 2.  I am glad it worked but I am beginning to think it was dumb

luck!

On Saturday 20 November 2004 03:28 am, Daniel Gray wrote:
> Thanks Nancy,
>
> I'm not certain how to post a continuation to a thread.
> Just reply, I guess, I can't find any way on sourceforge.
>
> Nancy, Your advice worked.  I did have to experiment a little.
> Actually the hosts file seems to have the shortname in the middle.
>
> 127.0.0.1    ROU     x1-6-00-e0-18-62-af-ec
>
> I wonder if the long name is a mac address.  It was the default when I
> installed Linux.
>
> Now Taskman works, the device manager seems to work,
> Now I need to get some devices working.
>
> Anybody able to queue to a USB printer ?
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Nancy
E.
> Anthracite
> Sent: Friday, November 19, 2004 8:54 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [Hardhats-members] Volume Sets
>
> Let's try that again.  I posted this in the wrong thread previously.
>
> It gets the name from hostname -s.  In my system, that traces back
> to /etc/hosts and to set the name to Morphix, for instance, this is what
> you
>
> have to do in the file:
>
> # Do not remove the following line, or various programs
> # that require network functionality will fail.
> 127.0.0.1       Morphix.localdomain     Morphix
>
> On Friday 19 November 2004 11:00 pm, Daniel Gray wrote:
> > Anybody:
> >
> > I am looking for information about the relationship between Linux "Host
> > Name", Vista "Volume Set", and Taskman "Box-Pair".  %ZOSV does a
> > function to recover the Linux "hostname", and this information is used,
> > for instance, by %ZIS to determine whether the requested device is
> > within the reach of the user.  Taskman also uses Linux "hostname" to see
> > if there is a box-pair defined, so taskman can run on specific server
> > nodes.
> >
> > I am new to Linux, is there any way to change the "hostname"?  When I
> > installed Linux, I took the default and it is 20 characters long.  Vista
> > likes simple names, like VAH, AAA, etc.
> >
> > I think, without a proper setup of hostname, volumeset, box-pair, and so
> > forth, neither deviceman nor taskman will work correctly.  At least, I
> > could not get SemiVistAViva0.4 to operate correctly, and I suspect this
> > is the problem.  I found after loading it that in Box-pair there was an
> > assumed a name for my computer.  GETENV^%ZOSV gets hostname for many
> > VistA functions.
> >
> > Is there any guidance out there for this issue ?
> >
> > Dan Gray
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: InterSystems CACHE
> > FREE OODBMS DOWNLOAD - A multidimensional database that combines
> > robust object and relational technologies, making it a perfect match
> > for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
> > _______________________________________________
> > Hardhats-members mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/hardhats-members

-- 
Nancy Anthracite


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Hardhats-members mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hardhats-members



-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Hardhats-members mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to