<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Convert File to String in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/convert-file-to-string/m-p/5190342#M42627</link>
    <description>Hamiltro,&lt;BR /&gt;&lt;BR /&gt;There are several tools that are geared up help you with all of this. Google around. Mine, and at least one other is called "GETUAI", there is also an are called UAF and such.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://vms.process.com/scripts/fileserv/fileserv.com?GETUAI" target="_blank"&gt;http://vms.process.com/scripts/fileserv/fileserv.com?GETUAI&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;But not using a tool has its use also.&lt;BR /&gt;So here is a comamnd file to just grab the right fields.&lt;BR /&gt;&lt;BR /&gt;Easily modified to skip the header or nor, or set outptu into a symbol.&lt;BR /&gt;&lt;BR /&gt;Enjoy!&lt;BR /&gt;--------------------- get_defdir.com --------&lt;BR /&gt;$clos/nolog lis&lt;BR /&gt;$open/read  lis sysuaf.lis&lt;BR /&gt;$loop:&lt;BR /&gt;$read/end=done lis record&lt;BR /&gt;$defdir = f$extr(69,99,record)&lt;BR /&gt;$if defdir .eqs. "Expired" then goto loop&lt;BR /&gt;$write sys$output f$extract(21,13,record), defdir&lt;BR /&gt;$goto loop&lt;BR /&gt;$done:&lt;BR /&gt;$close lis&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 29 Jul 2009 19:37:33 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2009-07-29T19:37:33Z</dc:date>
    <item>
      <title>Convert File to String</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/convert-file-to-string/m-p/5190338#M42623</link>
      <description>Running Alpha 7.3&lt;BR /&gt;&lt;BR /&gt;Long time reader first time poster&lt;BR /&gt;&lt;BR /&gt;My Question, I am writing a program and wanting to pull Directory of Users, Looking at one record at a time. &lt;BR /&gt;&lt;BR /&gt;$ mcr auth list USERNAME /brief&lt;BR /&gt;$ type sysuaf.lis /tail=1 /out=Temp.log&lt;BR /&gt;&lt;BR /&gt;type temp.log displays&lt;BR /&gt;SMITH, JOHN    SMITHJOH   [11,11]   1-11111   All   4   SYS$SYSDEVICE:[SMITHJOH]&lt;BR /&gt;&lt;BR /&gt;If I could turn the file into a string I could use F$Extract to get the info I need&lt;BR /&gt;&lt;BR /&gt;Thanks for the help</description>
      <pubDate>Wed, 29 Jul 2009 19:15:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/convert-file-to-string/m-p/5190338#M42623</guid>
      <dc:creator>Hamiltro</dc:creator>
      <dc:date>2009-07-29T19:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: Convert File to String</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/convert-file-to-string/m-p/5190339#M42624</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] I am writing a program [...]&lt;BR /&gt;&lt;BR /&gt;In what?  C?  Fortran?  DCL?  ???&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] I could use F$Extract [...]&lt;BR /&gt;&lt;BR /&gt;So, DCL?&lt;BR /&gt;&lt;BR /&gt;&amp;gt; If I could turn the file into a string&lt;BR /&gt;&amp;gt; [...]&lt;BR /&gt;&lt;BR /&gt;Then it would probably be too long to fit&lt;BR /&gt;into a DCL symbol.&lt;BR /&gt;&lt;BR /&gt;Why not read (READ) it one line at a time?</description>
      <pubDate>Wed, 29 Jul 2009 19:29:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/convert-file-to-string/m-p/5190339#M42624</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2009-07-29T19:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: Convert File to String</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/convert-file-to-string/m-p/5190340#M42625</link>
      <description>Sorry in DCL and convert a file to a logical</description>
      <pubDate>Wed, 29 Jul 2009 19:33:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/convert-file-to-string/m-p/5190340#M42625</guid>
      <dc:creator>Hamiltro</dc:creator>
      <dc:date>2009-07-29T19:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Convert File to String</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/convert-file-to-string/m-p/5190341#M42626</link>
      <description>&lt;!--!*#--&gt;&amp;gt; Why not read (READ) it one line at a time?&lt;BR /&gt;&lt;BR /&gt;That is, get a listing of all the users in&lt;BR /&gt;one file, then read that listing:&lt;BR /&gt;&lt;BR /&gt;$ mcr auth list /brief  ! No USERNAME&lt;BR /&gt;&lt;BR /&gt;READ will put one line into a DCL symbol, and&lt;BR /&gt;then you can f$locate and f$extract all you&lt;BR /&gt;want.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;There are more direct ways to read the UAF&lt;BR /&gt;from DCL, but they're not so simple.</description>
      <pubDate>Wed, 29 Jul 2009 19:36:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/convert-file-to-string/m-p/5190341#M42626</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2009-07-29T19:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Convert File to String</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/convert-file-to-string/m-p/5190342#M42627</link>
      <description>Hamiltro,&lt;BR /&gt;&lt;BR /&gt;There are several tools that are geared up help you with all of this. Google around. Mine, and at least one other is called "GETUAI", there is also an are called UAF and such.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://vms.process.com/scripts/fileserv/fileserv.com?GETUAI" target="_blank"&gt;http://vms.process.com/scripts/fileserv/fileserv.com?GETUAI&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;But not using a tool has its use also.&lt;BR /&gt;So here is a comamnd file to just grab the right fields.&lt;BR /&gt;&lt;BR /&gt;Easily modified to skip the header or nor, or set outptu into a symbol.&lt;BR /&gt;&lt;BR /&gt;Enjoy!&lt;BR /&gt;--------------------- get_defdir.com --------&lt;BR /&gt;$clos/nolog lis&lt;BR /&gt;$open/read  lis sysuaf.lis&lt;BR /&gt;$loop:&lt;BR /&gt;$read/end=done lis record&lt;BR /&gt;$defdir = f$extr(69,99,record)&lt;BR /&gt;$if defdir .eqs. "Expired" then goto loop&lt;BR /&gt;$write sys$output f$extract(21,13,record), defdir&lt;BR /&gt;$goto loop&lt;BR /&gt;$done:&lt;BR /&gt;$close lis&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 29 Jul 2009 19:37:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/convert-file-to-string/m-p/5190342#M42627</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2009-07-29T19:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Convert File to String</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/convert-file-to-string/m-p/5190343#M42628</link>
      <description>more code that does this:&lt;BR /&gt;&lt;A href="http://labs.hoffmanlabs.com/node/1260" target="_blank"&gt;http://labs.hoffmanlabs.com/node/1260&lt;/A&gt;</description>
      <pubDate>Wed, 29 Jul 2009 19:41:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/convert-file-to-string/m-p/5190343#M42628</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-07-29T19:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Convert File to String</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/convert-file-to-string/m-p/5190344#M42629</link>
      <description>&lt;!--!*#--&gt;Attached is an example template&lt;BR /&gt;&lt;BR /&gt;Here is the output from use&lt;BR /&gt;&lt;BR /&gt;$ @getuaf system&lt;BR /&gt;%UAF-I-LSTMSG1, writing listing file&lt;BR /&gt;%UAF-I-LSTMSG2, listing file SYSUAF.LIS complete&lt;BR /&gt;  USER_LINE = "SYSTEM MANAGER       SYSTEM            [1,4]      SYSTEM   All     4 SYS$SYSROOT:[SYSMGR]"&lt;BR /&gt;$ @getuaf [1,7] &lt;BR /&gt;%UAF-I-LSTMSG1, writing listing file&lt;BR /&gt;%UAF-I-LSTMSG2, listing file SYSUAF.LIS complete&lt;BR /&gt;  USER_LINE = "SYSTEST-UETP         SYSTEST           [1,7]      SYSTEST  All     4 Disuser"&lt;BR /&gt;  USER_LINE = "SYSTEST-UETP         SYSTEST_CLIG      [1,7]      SYSTEST  All     4 Disuser"&lt;BR /&gt;$</description>
      <pubDate>Wed, 29 Jul 2009 20:42:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/convert-file-to-string/m-p/5190344#M42629</guid>
      <dc:creator>Jon Pinkley</dc:creator>
      <dc:date>2009-07-29T20:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Convert File to String</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/convert-file-to-string/m-p/5190345#M42630</link>
      <description>&lt;BR /&gt;&amp;gt;&amp;gt; pull Directory of Users, &lt;BR /&gt;&lt;BR /&gt;You may want to elaborate how users are selected.&lt;BR /&gt;Because DIR /BRIEF will only fill in the dev+dir for valid users. &lt;BR /&gt;My example shows there may be records marked 'Expired'. &lt;BR /&gt;Jon shows 'Disuser'. But I guess that is already dealt with earlier, which is why you want to deal with 1 record.&lt;BR /&gt;&lt;BR /&gt;Too bad there is no F$GETUAI huh?&lt;BR /&gt;Personally I feel comfortable reading the columns directly from SYSUAF.DAT. &lt;BR /&gt;This stuff is not going to change no more.&lt;BR /&gt;&lt;BR /&gt;Here is an other script I had floating around and which you might find handy.&lt;BR /&gt;&lt;BR /&gt;$! uaf_defdevdir.com &lt;USERNAME&gt;    Hein van den Heuvel, April 2006.&lt;BR /&gt;$!libr/extr=$uafdef/out=uafdef.tmp sys$library:lib.mlb&lt;BR /&gt;$!sea uafdef.tmp _def&lt;BR /&gt;$!EQU    UAF$S_DEFDEV    32&lt;BR /&gt;$!EQU    UAF$T_DEFDEV    116&lt;BR /&gt;$!EQU    UAF$S_DEFDIR    64&lt;BR /&gt;$!EQU    UAF$T_DEFDIR    148&lt;BR /&gt;$!define sysuaf sys$disk:[]sysuaf.dat  ! Local copy for testting&lt;BR /&gt;$open /write/read/share=write uaf 'f$parse("SYSUAF","SYS$SYSTEM:.DAT",,,"SYNTAX_ONLY")&lt;BR /&gt;$loop:&lt;BR /&gt;$ read/end=done uaf rec ! more than 1?&lt;BR /&gt;$ if p1.nes."" then read/end=done/key=&amp;amp;p1 uaf rec   ! just 1&lt;BR /&gt;$ defdev=f$extr(116+1,f$cvsi(116*8,8,rec),rec)&lt;BR /&gt;$ defdir=f$extr(148+1,f$cvsi(148*8,8,rec),rec)&lt;BR /&gt;$ username=f$extr(0,12,rec)&lt;BR /&gt;$ write sys$output username, ": ", defdev, defdir&lt;BR /&gt;$ if p1.eqs."" then goto loop&lt;BR /&gt;$done:&lt;BR /&gt;$close uaf&lt;BR /&gt;&lt;BR /&gt;&lt;/USERNAME&gt;</description>
      <pubDate>Wed, 29 Jul 2009 21:03:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/convert-file-to-string/m-p/5190345#M42630</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2009-07-29T21:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Convert File to String</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/convert-file-to-string/m-p/5190346#M42631</link>
      <description>Thanks for the help and the fast replys</description>
      <pubDate>Thu, 30 Jul 2009 11:53:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/convert-file-to-string/m-p/5190346#M42631</guid>
      <dc:creator>Hamiltro</dc:creator>
      <dc:date>2009-07-30T11:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Convert File to String</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/convert-file-to-string/m-p/5190347#M42632</link>
      <description>Found a working solution from one of the replys</description>
      <pubDate>Thu, 30 Jul 2009 11:54:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/convert-file-to-string/m-p/5190347#M42632</guid>
      <dc:creator>Hamiltro</dc:creator>
      <dc:date>2009-07-30T11:54:12Z</dc:date>
    </item>
  </channel>
</rss>

