<?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: Fortran IAND equivalent command in VMS DCL in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792844#M34179</link>
    <description>$ if flag7 .AND. numflags then write sys$output "flag7 is on"&lt;BR /&gt;$ if flag9 .AND. numflags then write sys$output "flag9 is on"&lt;BR /&gt;&lt;BR /&gt;The expression will be true if flag7 = numflags.&lt;BR /&gt;If numflags is 320 then then it will never be true. 64 is 1000000. 320 is 101000000. &lt;BR /&gt;&lt;BR /&gt;You are confusioning vectors with masks.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 22 May 2006 22:54:19 GMT</pubDate>
    <dc:creator>Thomas Ritter</dc:creator>
    <dc:date>2006-05-22T22:54:19Z</dc:date>
    <item>
      <title>Fortran IAND equivalent command in VMS DCL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792840#M34175</link>
      <description>Good day.&lt;BR /&gt;&lt;BR /&gt;Is there an equivalent VMS DCL command of Fortran IAND? I am trying to figure out how to check in DCL if a bit mask has been set for a database field. The database field has been exported to a text file and I extract the database field from the text string.&lt;BR /&gt;&lt;BR /&gt;Here is the sample Fortran code that I want to copy over in DCL/VMS .COM file.&lt;BR /&gt;&lt;BR /&gt;logical*4 function bit_check (arg1,arg2)&lt;BR /&gt;implicit none&lt;BR /&gt;&lt;BR /&gt;integer*4 arg1,arg2&lt;BR /&gt;&lt;BR /&gt;bit_check = 0 .ne. IAND (arg1,arg2)&lt;BR /&gt;return&lt;BR /&gt;end</description>
      <pubDate>Mon, 22 May 2006 21:02:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792840#M34175</guid>
      <dc:creator>Nelson Juinio</dc:creator>
      <dc:date>2006-05-22T21:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Fortran IAND equivalent command in VMS DCL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792841#M34176</link>
      <description>Nelson,&lt;BR /&gt;&lt;BR /&gt;The operator is ".AND."&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;&lt;BR /&gt;  $  X = 5&lt;BR /&gt;  $  Y = 7&lt;BR /&gt;  $  WRITE SYS$OUTPUT X .AND. Y&lt;BR /&gt;&lt;BR /&gt;- Bob Gezelter, &lt;A href="http://www.rlgsc.com" target="_blank"&gt;http://www.rlgsc.com&lt;/A&gt;</description>
      <pubDate>Mon, 22 May 2006 21:09:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792841#M34176</guid>
      <dc:creator>Robert Gezelter</dc:creator>
      <dc:date>2006-05-22T21:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Fortran IAND equivalent command in VMS DCL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792842#M34177</link>
      <description>Hello Bob,&lt;BR /&gt;&lt;BR /&gt;Thanks for the quick reply! Although I am not getting the result that I need.&lt;BR /&gt;&lt;BR /&gt;I need to be able to check an integer symbol if it has a particular bit mask turned on.&lt;BR /&gt;&lt;BR /&gt;$ open infile test.tab&lt;BR /&gt;$ read infile inrecord&lt;BR /&gt;$ flags = f$extract(104,12,inrecord)&lt;BR /&gt;$ show sym flags&lt;BR /&gt;  FLAGS = "         320"&lt;BR /&gt;$ flag1 = 1&lt;BR /&gt;$ flag2 = 2&lt;BR /&gt;$ flag3 = 4&lt;BR /&gt;$ flag4 = 8&lt;BR /&gt;$ flag5 = 16&lt;BR /&gt;$ flag6 = 32&lt;BR /&gt;$ flag7 = 64&lt;BR /&gt;$ flag8 = 128&lt;BR /&gt;$ flag9 = 256&lt;BR /&gt;$ numflags = f$integer(flags)&lt;BR /&gt;$ show sym numflags&lt;BR /&gt;  NUMFLAGS = 320   Hex = 00000140  Octal = 00000000500&lt;BR /&gt;$ if flag7 .AND. numflags then write sys$output "flag7 is on"&lt;BR /&gt;$ if flag9 .AND. numflags then write sys$output "flag9 is on"&lt;BR /&gt;&lt;BR /&gt;The flags value of 320 is a combination of flag7 (64) and flag9 (256).&lt;BR /&gt;&lt;BR /&gt;What am I doing wrong? Or is this even possible in DCL?&lt;BR /&gt;&lt;BR /&gt;Thanks again!&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;Nelson</description>
      <pubDate>Mon, 22 May 2006 21:48:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792842#M34177</guid>
      <dc:creator>Nelson Juinio</dc:creator>
      <dc:date>2006-05-22T21:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: Fortran IAND equivalent command in VMS DCL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792843#M34178</link>
      <description>&lt;!--!*#--&gt;Try&lt;BR /&gt;&lt;BR /&gt;$ if ((flag7 .AND. numflags) .ne. 0) then write sys$output "flag7 is on"&lt;BR /&gt;$ if ((flag9 .AND. numflags) .ne. 0) then write sys$output "flag9 is on"&lt;BR /&gt;&lt;BR /&gt;Dave&lt;BR /&gt;</description>
      <pubDate>Mon, 22 May 2006 22:39:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792843#M34178</guid>
      <dc:creator>David B Sneddon</dc:creator>
      <dc:date>2006-05-22T22:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: Fortran IAND equivalent command in VMS DCL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792844#M34179</link>
      <description>$ if flag7 .AND. numflags then write sys$output "flag7 is on"&lt;BR /&gt;$ if flag9 .AND. numflags then write sys$output "flag9 is on"&lt;BR /&gt;&lt;BR /&gt;The expression will be true if flag7 = numflags.&lt;BR /&gt;If numflags is 320 then then it will never be true. 64 is 1000000. 320 is 101000000. &lt;BR /&gt;&lt;BR /&gt;You are confusioning vectors with masks.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 22 May 2006 22:54:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792844#M34179</guid>
      <dc:creator>Thomas Ritter</dc:creator>
      <dc:date>2006-05-22T22:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: Fortran IAND equivalent command in VMS DCL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792845#M34180</link>
      <description>Forgot, use&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;  F$CVSI&lt;BR /&gt;&lt;BR /&gt;       Converts the specified bits in the specified character string to&lt;BR /&gt;       a signed number.&lt;BR /&gt;&lt;BR /&gt;       Format&lt;BR /&gt;&lt;BR /&gt;         F$CVSI(start-bit,number-of-bits,string)&lt;BR /&gt;</description>
      <pubDate>Mon, 22 May 2006 23:03:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792845#M34180</guid>
      <dc:creator>Thomas Ritter</dc:creator>
      <dc:date>2006-05-22T23:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Fortran IAND equivalent command in VMS DCL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792846#M34181</link>
      <description>The test for TRUE is based on the LOW BIT being on or off.&lt;BR /&gt;&lt;BR /&gt;Your .AND. will result in the test flag being set, but that is not bit 0.&lt;BR /&gt;But if the value (320 has either flag7 or flag9 set then an AND with that delivers a non-zero value. Thus, as David write test for non-zero:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$  flag7 = 64&lt;BR /&gt;$  x = 320&lt;BR /&gt;$  y = x.and.flag7&lt;BR /&gt;$ show symb y&lt;BR /&gt;  Y = 64   Hex = 00000040  Octal = 00000000100&lt;BR /&gt;$ if y then write sys$output "true"&lt;BR /&gt;$  z = (x.and.flag7).ne.0&lt;BR /&gt;$  show symb z&lt;BR /&gt;  Z = 1   Hex = 00000001  Octal = 00000000001&lt;BR /&gt;$ if z then write sys$output "true"&lt;BR /&gt;true&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Mon, 22 May 2006 23:34:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792846#M34181</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-05-22T23:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: Fortran IAND equivalent command in VMS DCL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792847#M34182</link>
      <description>&amp;gt; The test for TRUE is based on the LOW BIT&lt;BR /&gt;&amp;gt; being on or off.&lt;BR /&gt;&lt;BR /&gt;Same as in Fortran, right?  Which is why the&lt;BR /&gt;test in the Fortran code was "0 .ne.[...]"&lt;BR /&gt;&lt;BR /&gt;Come to think of it, who still uses IAND()&lt;BR /&gt;in Fortran?  Logical operators (like .AND.)&lt;BR /&gt;have been in common use for decades.&lt;BR /&gt;&lt;BR /&gt;In other words, logical operations in DCL&lt;BR /&gt;look and act a lot like logical operations in&lt;BR /&gt;Fortran, unless your Fortran dates back to&lt;BR /&gt;1966.</description>
      <pubDate>Tue, 23 May 2006 00:29:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792847#M34182</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2006-05-23T00:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Fortran IAND equivalent command in VMS DCL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792848#M34183</link>
      <description>Thank you all for your help and valuable inputs. :)</description>
      <pubDate>Tue, 23 May 2006 00:40:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792848#M34183</guid>
      <dc:creator>Nelson Juinio</dc:creator>
      <dc:date>2006-05-23T00:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: Fortran IAND equivalent command in VMS DCL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792849#M34184</link>
      <description>Nelson, see the attached hack.  It's not pretty but you can see how to get multiple bit values for small numbers.  Sample output:&lt;BR /&gt;&lt;BR /&gt;$ @cvui 320&lt;BR /&gt;320=101000000&lt;BR /&gt;flag7 is on&lt;BR /&gt;flag9 is on&lt;BR /&gt;&lt;BR /&gt;$ @cvui 444&lt;BR /&gt;444=110111100&lt;BR /&gt;flag3 is on&lt;BR /&gt;flag4 is on&lt;BR /&gt;flag5 is on&lt;BR /&gt;flag6 is on&lt;BR /&gt;flag8 is on&lt;BR /&gt;flag9 is on</description>
      <pubDate>Tue, 23 May 2006 21:56:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792849#M34184</guid>
      <dc:creator>John Kamaka</dc:creator>
      <dc:date>2006-05-23T21:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: Fortran IAND equivalent command in VMS DCL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792850#M34185</link>
      <description>John, thanks for the correction.&lt;BR /&gt;Use f$cvui not f$cvsi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Lexicals&lt;BR /&gt;&lt;BR /&gt;  F$CVUI&lt;BR /&gt;&lt;BR /&gt;       Extracts bit fields from character string data and converts the&lt;BR /&gt;       result to an unsigned number.&lt;BR /&gt;&lt;BR /&gt;       Format&lt;BR /&gt;&lt;BR /&gt;         F$CVUI(start-bit,number-of-bits,string)&lt;BR /&gt;     &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 23 May 2006 22:03:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792850#M34185</guid>
      <dc:creator>Thomas Ritter</dc:creator>
      <dc:date>2006-05-23T22:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: Fortran IAND equivalent command in VMS DCL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792851#M34186</link>
      <description>Mea cupla, forgot to rename .com attachment to .txt.</description>
      <pubDate>Wed, 24 May 2006 00:49:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792851#M34186</guid>
      <dc:creator>John Kamaka</dc:creator>
      <dc:date>2006-05-24T00:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Fortran IAND equivalent command in VMS DCL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792852#M34187</link>
      <description>My ususal quick way to see the bit settings of a number is to simple assign that value to a symbol and SHOW that symbol.&lt;BR /&gt;It displays in Octal and in Hex, and those translate character by character to the bit pattern.&lt;BR /&gt;Of course, in a procedure, the already given .AND. will do the trick just fine.&lt;BR /&gt;But even there, it is a lot more intuitive to .AND. with a %O or a %X value!&lt;BR /&gt;&lt;BR /&gt;fwiw.&lt;BR /&gt;&lt;BR /&gt;Proost.&lt;BR /&gt;&lt;BR /&gt;Have one on me (if/when you locate me at the bar in Nashua Sheraton)&lt;BR /&gt;&lt;BR /&gt;jpe</description>
      <pubDate>Wed, 24 May 2006 12:04:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/fortran-iand-equivalent-command-in-vms-dcl/m-p/3792852#M34187</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2006-05-24T12:04:22Z</dc:date>
    </item>
  </channel>
</rss>

