<?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: OpenVMS - DTR Command Inside COM File? in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/openvms-dtr-command-inside-com-file/m-p/4509444#M42977</link>
    <description>&lt;BR /&gt;Actually just add the two commands:&lt;BR /&gt;&lt;BR /&gt;$ cd RMH$ALLGPD8&lt;BR /&gt;$ dtr&lt;BR /&gt;&lt;BR /&gt;to the beginning of your RMH_UNLOCK_ACCOUNT.COM (right above the SET DICTIONARY command)&lt;BR /&gt;&lt;BR /&gt;then (maybe in your LOGIN.COM) add the symbol definition:&lt;BR /&gt;&lt;BR /&gt;$ ulpa :== @dev:[dir]RMH_UNLOCK_ACCOUNT.COM&lt;BR /&gt;&lt;BR /&gt;and you should be set.</description>
    <pubDate>Wed, 07 Oct 2009 12:36:17 GMT</pubDate>
    <dc:creator>EdgarZamora_1</dc:creator>
    <dc:date>2009-10-07T12:36:17Z</dc:date>
    <item>
      <title>OpenVMS - DTR Command Inside COM File?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/openvms-dtr-command-inside-com-file/m-p/4509442#M42975</link>
      <description>We currently have a short set of commands that we execute at the DCL prompt that enable us to attempt to unlock patient accounts/medical records that are "in use/locked".&lt;BR /&gt;&lt;BR /&gt;Here are the two lines of text we enter at the DCL prompt:&lt;BR /&gt;&lt;BR /&gt;cd RMH$ALLGPDS&lt;BR /&gt;dtr @RMH_UNLOCK_ACCOUNT&lt;BR /&gt;&lt;BR /&gt;This prompts for "enter patient account number:"&lt;BR /&gt;&lt;BR /&gt;Here are the contents of the "RMH_UNLOCK_ACCOUNT" file:&lt;BR /&gt;&lt;BR /&gt;! RMH_UNLOCK_ACCOUNT.COM&lt;BR /&gt;!&lt;BR /&gt;! ROUTINE TO UNLOCK LOCK ACCOUNT RECORDS - KDILLER/SANDERSON 02/99&lt;BR /&gt;SET DICTIONARY PD_CDD&lt;BR /&gt;SET LOCK_WAIT&lt;BR /&gt;READY PDIACCMAS SHARED WRITE&lt;BR /&gt;READY PDImpinme SHARED WRITE&lt;BR /&gt;!&lt;BR /&gt;!DEFINE VARIABLE TO COLLECT ACCT AND QUERY USER FOR ACCT&lt;BR /&gt;DECLARE INPUT_ACCT PIC 9(12).&lt;BR /&gt;INPUT_ACCT = *."ENTER ACCOUNT NUMBER TO UNLOCK "&lt;BR /&gt;!&lt;BR /&gt;!MOVE ACCT THAT THE USER INPUT AND STORE IN THE REQUIRED FORMAT &lt;BR /&gt;!DECLARE WK_ACCT PIC X(12) COMPUTED BY FORMAT INPUT_ACCT USING 9(12).&lt;BR /&gt;!FIND LOCKED RECORD&lt;BR /&gt;FIND PDIACCMAS cross pdimpinme WITH CH_PNO_KEY = INPUT_ACCT and&lt;BR /&gt;        ch_enrollment_no_key = mpi_enrollment_no and &lt;BR /&gt;        MPI_RECORD_TYPE = "00"&lt;BR /&gt;!LIST THE RECORD BEFORE IT IS MODIFIED&lt;BR /&gt;FOR CURRENT LIST CH_SOFT_LOCK, ch_cds_soft_lock, mpi_soft_lock, CH_PT_LAST_NAMEE&lt;BR /&gt;MODIFY CURRENT USING CH_SOFT_LOCK = 0&lt;BR /&gt;MODIFY CURRENT USING CH_cds_SOFT_LOCK = 0&lt;BR /&gt;MODIFY CURRENT USING mpi_SOFT_LOCK = 0&lt;BR /&gt;!LIST THE RECORD AFTER IT IS MODIFIED&lt;BR /&gt;FOR CURRENT LIST CH_SOFT_LOCK, ch_cds_soft_lock, mpi_soft_lock, CH_PT_LAST_NAMEE&lt;BR /&gt;&lt;BR /&gt;----------------&lt;BR /&gt;Ok, this is what I'd like to do: I'd like to write a script that will enable me to perform this same set of functions with a simple command like "ulpa" (script for 'unlock patient account').  I've tried creating a com file for this, as well as a symbol, but I don't know enough about OpenVMS do get it to work, and I've not been able to find any information online to help me.&lt;BR /&gt;&lt;BR /&gt;If anyone can help me create this, what I think should be a fairly simple script, it would be greatly appreciated.&lt;BR /&gt;&lt;BR /&gt;Thank you :)</description>
      <pubDate>Wed, 07 Oct 2009 11:10:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/openvms-dtr-command-inside-com-file/m-p/4509442#M42975</guid>
      <dc:creator>Shuey</dc:creator>
      <dc:date>2009-10-07T11:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: OpenVMS - DTR Command Inside COM File?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/openvms-dtr-command-inside-com-file/m-p/4509443#M42976</link>
      <description>Shuey,&lt;BR /&gt;&lt;BR /&gt;welcome to the OpenVMS ITRC forum.&lt;BR /&gt;&lt;BR /&gt;Something like this may work:&lt;BR /&gt;&lt;BR /&gt;$ CREATE ULPA.COM&lt;BR /&gt;$ cd RMH$ALLGPDS&lt;BR /&gt;$ DEFINE/USER SYS$INPUT SYS$COMMAND ! read from terminal&lt;BR /&gt;$ dtr @RMH_UNLOCK_ACCOUNT&lt;BR /&gt;&lt;CTRL-Z&gt;&lt;BR /&gt;$ ULPA:=="@SYS$DISK:[]ULPA.COM"&lt;BR /&gt;$ ULPA&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;You may need to replace SYS$DISK:[] with a valid device and directory on your system.&lt;BR /&gt;&lt;BR /&gt;They key here is to re-define SYS$INPUT before invoking DTR. This will cause the prompt for input to be done from the terminal, instead of from the .COM procedure itself.&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;&lt;BR /&gt;Volker.&lt;/CTRL-Z&gt;</description>
      <pubDate>Wed, 07 Oct 2009 11:29:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/openvms-dtr-command-inside-com-file/m-p/4509443#M42976</guid>
      <dc:creator>Volker Halle</dc:creator>
      <dc:date>2009-10-07T11:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: OpenVMS - DTR Command Inside COM File?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/openvms-dtr-command-inside-com-file/m-p/4509444#M42977</link>
      <description>&lt;BR /&gt;Actually just add the two commands:&lt;BR /&gt;&lt;BR /&gt;$ cd RMH$ALLGPD8&lt;BR /&gt;$ dtr&lt;BR /&gt;&lt;BR /&gt;to the beginning of your RMH_UNLOCK_ACCOUNT.COM (right above the SET DICTIONARY command)&lt;BR /&gt;&lt;BR /&gt;then (maybe in your LOGIN.COM) add the symbol definition:&lt;BR /&gt;&lt;BR /&gt;$ ulpa :== @dev:[dir]RMH_UNLOCK_ACCOUNT.COM&lt;BR /&gt;&lt;BR /&gt;and you should be set.</description>
      <pubDate>Wed, 07 Oct 2009 12:36:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/openvms-dtr-command-inside-com-file/m-p/4509444#M42977</guid>
      <dc:creator>EdgarZamora_1</dc:creator>
      <dc:date>2009-10-07T12:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: OpenVMS - DTR Command Inside COM File?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/openvms-dtr-command-inside-com-file/m-p/4509445#M42978</link>
      <description>Edgar,&lt;BR /&gt;&lt;BR /&gt;note that there is an INPUT statement in the DTR script. Without re-assigning SYS$INPUT to read from the terminal (i.e. SYS$COMMAND), it will fail.&lt;BR /&gt;&lt;BR /&gt;So building upon your suggestion, adding&lt;BR /&gt;&lt;BR /&gt;$ CD RMH$ALLGPDS&lt;BR /&gt;$ DEFINE/USER SYS$INPUT SYS$COMMAND&lt;BR /&gt;$ DTR&lt;BR /&gt;&lt;BR /&gt;at the beginning of that script should also work. But then users, who still follow the old habit of invoking those commands seperately, will fail...&lt;BR /&gt;&lt;BR /&gt;Volker.</description>
      <pubDate>Wed, 07 Oct 2009 12:40:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/openvms-dtr-command-inside-com-file/m-p/4509445#M42978</guid>
      <dc:creator>Volker Halle</dc:creator>
      <dc:date>2009-10-07T12:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: OpenVMS - DTR Command Inside COM File?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/openvms-dtr-command-inside-com-file/m-p/4509446#M42979</link>
      <description>&lt;!--!*#--&gt;&amp;gt; $ cd RMH$ALLGPDS&lt;BR /&gt;&lt;BR /&gt;In general, I'd advise against using a symbol&lt;BR /&gt;like this "cd" in a DCL procedure, unless&lt;BR /&gt;you're sure that every user of the procedure&lt;BR /&gt;has (and always will have) the same&lt;BR /&gt;definition for that symbol.&lt;BR /&gt;&lt;BR /&gt;I've seen too many DCL procedures fail like:&lt;BR /&gt;&lt;BR /&gt;%DCL-W-IVVERB, unrecognized command verb - check validity and spelling&lt;BR /&gt; \SAY\&lt;BR /&gt;&lt;BR /&gt;because its author had "say" defined:&lt;BR /&gt;&lt;BR /&gt;      say == "write sys$output"&lt;BR /&gt;&lt;BR /&gt;and I didn't.</description>
      <pubDate>Wed, 07 Oct 2009 13:14:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/openvms-dtr-command-inside-com-file/m-p/4509446#M42979</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2009-10-07T13:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: OpenVMS - DTR Command Inside COM File?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/openvms-dtr-command-inside-com-file/m-p/4509447#M42980</link>
      <description>I missed that one, Volker!&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Oct 2009 13:51:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/openvms-dtr-command-inside-com-file/m-p/4509447#M42980</guid>
      <dc:creator>EdgarZamora_1</dc:creator>
      <dc:date>2009-10-07T13:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: OpenVMS - DTR Command Inside COM File?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/openvms-dtr-command-inside-com-file/m-p/4509448#M42981</link>
      <description>Thank you to everyone who replied, I really appreciate it! :)&lt;BR /&gt;&lt;BR /&gt;Volker: I will use the info you gave me to try and create this script within the next week.  I'll reply back to let you know how it goes ;)</description>
      <pubDate>Thu, 08 Oct 2009 10:47:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/openvms-dtr-command-inside-com-file/m-p/4509448#M42981</guid>
      <dc:creator>Shuey</dc:creator>
      <dc:date>2009-10-08T10:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: OpenVMS - DTR Command Inside COM File?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/openvms-dtr-command-inside-com-file/m-p/4509449#M42982</link>
      <description>Big thanks to Volker for the help!!&lt;BR /&gt;&lt;BR /&gt;Here is what we came up with:&lt;BR /&gt;&lt;BR /&gt;We created a file ulpa.com&lt;BR /&gt;&lt;BR /&gt;$ set def RMH$ALLGPDS&lt;BR /&gt;$ DEFINE/USER SYS$INPUT SYS$COMMAND&lt;BR /&gt;$ dtr @RMH_UNLOCK_ACCOUNT&lt;BR /&gt;$ set def sys$login&lt;BR /&gt;&lt;BR /&gt;and we added these lines to our login.com file:&lt;BR /&gt;&lt;BR /&gt;$       ulpa :== @DISK$SMSUSER1:[PRDOPER]ulpa.com&lt;BR /&gt;$       ulmr :== @DISK$SMSUSER1:[PRDOPER]ulmr.com&lt;BR /&gt;&lt;BR /&gt;These scripts work great now&lt;BR /&gt;&lt;BR /&gt;Thank you again to everyone, but especially thanks to Volker!!</description>
      <pubDate>Fri, 16 Oct 2009 12:16:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/openvms-dtr-command-inside-com-file/m-p/4509449#M42982</guid>
      <dc:creator>Shuey</dc:creator>
      <dc:date>2009-10-16T12:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: OpenVMS - DTR Command Inside COM File?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/openvms-dtr-command-inside-com-file/m-p/4509450#M42983</link>
      <description>&amp;gt;&amp;gt; Big thanks to Volker for the help!!&lt;BR /&gt;&lt;BR /&gt;I'm glad you are happy, but pease realize that it is a total BS solution, which SUBTRACTS value from the system instead of adding.&lt;BR /&gt;&lt;BR /&gt;- It adds a file --&amp;gt; more dependencies&lt;BR /&gt;- It has the side effect of forcing a users back to SYS$LOGIN on exit&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Why not just use:&lt;BR /&gt;&lt;BR /&gt;$ ulpa :== "dtr @RMH$ALLGPDS:RMH_UNLOCK_ACCOUNT"&lt;BR /&gt;&lt;BR /&gt;That does not change the default directory.&lt;BR /&gt;Consequently it requires the data files to be in a well defined place. If this simpler setup fails with a file open problem then you need to look at the two domain definitions.&lt;BR /&gt;Go into datatrieve and issues:&lt;BR /&gt;DTR&amp;gt; SHOW PD_CDD.PDIACCMAS  &lt;BR /&gt;:&lt;BR /&gt;This will show how it uses a record definition on a file. Check the file specification. Add RMH$ALLGPDS: if need be, or make sure a logical name for the file is in place.&lt;BR /&gt;&lt;BR /&gt;But skipping the negative value intermediate procedure probably is still not the optimal solution. You should probably consider storing the all the command from RMH_UNLOCK_ACCOUNT into the datatrieve dictionary as a procedure. That way everything lives together.&lt;BR /&gt;DTR&amp;gt; DEFINE PROCEDURE PD_CDD.RMH_UNLOCK_ACCOUNT&lt;BR /&gt;:&lt;BR /&gt;DTR&amp;gt; END_PROCEDURE&lt;BR /&gt;&lt;BR /&gt;Now define your dcl command as:&lt;BR /&gt;&lt;BR /&gt;$ ulpa :== "dtr :PD_CDD.RMH_UNLOCK_ACCOUNT"&lt;BR /&gt;&lt;BR /&gt;Good luck!&lt;BR /&gt;Hein&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Oct 2009 13:09:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/openvms-dtr-command-inside-com-file/m-p/4509450#M42983</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2009-10-16T13:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: OpenVMS - DTR Command Inside COM File?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/openvms-dtr-command-inside-com-file/m-p/4509451#M42984</link>
      <description>Thanks for the reply.  You're right, I had the script running fine yesterday but now it's broken...&lt;BR /&gt;&lt;BR /&gt;I don't know enough about OpenVMS and the info you gave me, so I'm going to have one of our admins or analysts help me with this.&lt;BR /&gt;&lt;BR /&gt;Thank you for the info.  I'll reply back once I have a correct, working script :)</description>
      <pubDate>Fri, 16 Oct 2009 17:28:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/openvms-dtr-command-inside-com-file/m-p/4509451#M42984</guid>
      <dc:creator>Shuey</dc:creator>
      <dc:date>2009-10-16T17:28:34Z</dc:date>
    </item>
  </channel>
</rss>

