<?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: regarding system functions in ovms in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/regarding-system-functions-in-ovms/m-p/4050883#M38159</link>
    <description>On q-2, I meant to add... the program can probably also just open the variable length record type input file, and create a new file with different name (C rtl can inherit file attributes). The loop to read from old and write to new.&lt;BR /&gt;&lt;BR /&gt;Steven wrote "A process doesn't call a function, a program does.  Exactly what are you trying to test here?"&lt;BR /&gt;&lt;BR /&gt;Greate minds...&lt;BR /&gt;&lt;BR /&gt;Hein.</description>
    <pubDate>Tue, 07 Aug 2007 08:12:22 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2007-08-07T08:12:22Z</dc:date>
    <item>
      <title>regarding system functions in ovms</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/regarding-system-functions-in-ovms/m-p/4050879#M38155</link>
      <description>Hi&lt;BR /&gt; I have below two queries:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;q-1) I want to change file format from "Variable type"  to "stream_lf" format using C code in OVMS platform.&lt;BR /&gt;Please let me know how can I change the file format and what system function should I use?&lt;BR /&gt;&lt;BR /&gt;q-2) I want to execute a portion of the code depending on which process calls that function. How do I make know the function, foo  that process, "test"  has called it?&lt;BR /&gt;code snippet:&lt;BR /&gt;&lt;BR /&gt;void function foo(int a, int b)&lt;BR /&gt;{&lt;BR /&gt;   a = a *b;&lt;BR /&gt;    if (process_test has callled)    /* "test" is a process running in the system */&lt;BR /&gt;    {&lt;BR /&gt;      a =a/b;   &lt;BR /&gt;     }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;ajaydec</description>
      <pubDate>Tue, 07 Aug 2007 05:15:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/regarding-system-functions-in-ovms/m-p/4050879#M38155</guid>
      <dc:creator />
      <dc:date>2007-08-07T05:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: regarding system functions in ovms</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/regarding-system-functions-in-ovms/m-p/4050880#M38156</link>
      <description>The CONV routines do what the CONVERT command does and are callable from C&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/doc/83final/4493/4493pro_006.html#4493_conv_chap" target="_blank"&gt;http://h71000.www7.hp.com/doc/83final/4493/4493pro_006.html#4493_conv_chap&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You can obtain the current process name using LIB$GETJPI&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Aug 2007 05:35:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/regarding-system-functions-in-ovms/m-p/4050880#M38156</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2007-08-07T05:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: regarding system functions in ovms</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/regarding-system-functions-in-ovms/m-p/4050881#M38157</link>
      <description>&lt;!--!*#--&gt;&amp;gt; Please let me know how can I change the&lt;BR /&gt;&amp;gt; file format [...]&lt;BR /&gt;&lt;BR /&gt;Are you trying to do something like:&lt;BR /&gt;&lt;BR /&gt;CONVERT file1 file2 /FDL = SYS$INPUT&lt;BR /&gt;RECORD&lt;BR /&gt;    FORMAT stream_lf&lt;BR /&gt;&lt;BR /&gt;or something like:&lt;BR /&gt;&lt;BR /&gt;SET FILE /ATTRIBUTES = RFM: STMLF file&lt;BR /&gt;&lt;BR /&gt;???&lt;BR /&gt;&lt;BR /&gt;Or are you trying to create a file in C with&lt;BR /&gt;the right attributes in the first place?&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] depending on which process calls that&lt;BR /&gt;&amp;gt; function.&lt;BR /&gt;&lt;BR /&gt;A process doesn't call a function, a program&lt;BR /&gt;does.  Exactly what are you trying to test&lt;BR /&gt;here?</description>
      <pubDate>Tue, 07 Aug 2007 07:57:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/regarding-system-functions-in-ovms/m-p/4050881#M38157</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2007-08-07T07:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: regarding system functions in ovms</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/regarding-system-functions-in-ovms/m-p/4050882#M38158</link>
      <description>q-1) I want to change file format from "Variable type" to "stream_lf" format using C code in OVMS platform.&lt;BR /&gt;&lt;BR /&gt;As Ian indicates, calleable convert is the right way to go. You would have to pass convert an FDL file reading: "RECORD; FORMAT STREAM_LF;" no more, no less.&lt;BR /&gt;If this happens less than a few times per hour, then it is tempting to spawn a process to convert the file using something like: &lt;BR /&gt;sprintf (cmd, "convert/fdl=stream_lf %s %s", old, new);&lt;BR /&gt;system(cmd);&lt;BR /&gt;&lt;BR /&gt;q-2) I want to execute a portion of the code depending on which process calls that function.&lt;BR /&gt;&lt;BR /&gt;First, you would have to decide what makes a particular process unique so you can identify it.If that is based on the process name, then you can use SYS$GETJPI or LIB$GETJPI output to get the process name as Ina indicates. &lt;BR /&gt;Or maybe a c rtl call like 'getuid', or get the image name from getjpi or the 0 program argument.&lt;BR /&gt;&lt;BR /&gt;More likely you want to use an environment variable, or a command line argument to indicate what to do next.&lt;BR /&gt;&lt;BR /&gt;Finally, if you have mroe questions about this, then please clarify the statement "which process calls that function"&lt;BR /&gt;Processess do not call functions.&lt;BR /&gt;Processess run images which call functions.&lt;BR /&gt;The function can be linked with the image, or in a static library or in a dynamically actived dynamic shareable library. The exact method used may offer further opportunities for solutions.&lt;BR /&gt;&lt;BR /&gt;Hope this helps some,&lt;BR /&gt;Hein van den Heuvel (at gmail dot com)&lt;BR /&gt;HvdH Performance Consulting&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Aug 2007 08:04:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/regarding-system-functions-in-ovms/m-p/4050882#M38158</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-08-07T08:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: regarding system functions in ovms</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/regarding-system-functions-in-ovms/m-p/4050883#M38159</link>
      <description>On q-2, I meant to add... the program can probably also just open the variable length record type input file, and create a new file with different name (C rtl can inherit file attributes). The loop to read from old and write to new.&lt;BR /&gt;&lt;BR /&gt;Steven wrote "A process doesn't call a function, a program does.  Exactly what are you trying to test here?"&lt;BR /&gt;&lt;BR /&gt;Greate minds...&lt;BR /&gt;&lt;BR /&gt;Hein.</description>
      <pubDate>Tue, 07 Aug 2007 08:12:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/regarding-system-functions-in-ovms/m-p/4050883#M38159</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-08-07T08:12:22Z</dc:date>
    </item>
  </channel>
</rss>

