- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: OpenVMS - DTR Command Inside COM File?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-07-2009 04:10 AM
тАО10-07-2009 04:10 AM
Here are the two lines of text we enter at the DCL prompt:
cd RMH$ALLGPDS
dtr @RMH_UNLOCK_ACCOUNT
This prompts for "enter patient account number:"
Here are the contents of the "RMH_UNLOCK_ACCOUNT" file:
! RMH_UNLOCK_ACCOUNT.COM
!
! ROUTINE TO UNLOCK LOCK ACCOUNT RECORDS - KDILLER/SANDERSON 02/99
SET DICTIONARY PD_CDD
SET LOCK_WAIT
READY PDIACCMAS SHARED WRITE
READY PDImpinme SHARED WRITE
!
!DEFINE VARIABLE TO COLLECT ACCT AND QUERY USER FOR ACCT
DECLARE INPUT_ACCT PIC 9(12).
INPUT_ACCT = *."ENTER ACCOUNT NUMBER TO UNLOCK "
!
!MOVE ACCT THAT THE USER INPUT AND STORE IN THE REQUIRED FORMAT
!DECLARE WK_ACCT PIC X(12) COMPUTED BY FORMAT INPUT_ACCT USING 9(12).
!FIND LOCKED RECORD
FIND PDIACCMAS cross pdimpinme WITH CH_PNO_KEY = INPUT_ACCT and
ch_enrollment_no_key = mpi_enrollment_no and
MPI_RECORD_TYPE = "00"
!LIST THE RECORD BEFORE IT IS MODIFIED
FOR CURRENT LIST CH_SOFT_LOCK, ch_cds_soft_lock, mpi_soft_lock, CH_PT_LAST_NAMEE
MODIFY CURRENT USING CH_SOFT_LOCK = 0
MODIFY CURRENT USING CH_cds_SOFT_LOCK = 0
MODIFY CURRENT USING mpi_SOFT_LOCK = 0
!LIST THE RECORD AFTER IT IS MODIFIED
FOR CURRENT LIST CH_SOFT_LOCK, ch_cds_soft_lock, mpi_soft_lock, CH_PT_LAST_NAMEE
----------------
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.
If anyone can help me create this, what I think should be a fairly simple script, it would be greatly appreciated.
Thank you :)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-07-2009 04:29 AM
тАО10-07-2009 04:29 AM
Solutionwelcome to the OpenVMS ITRC forum.
Something like this may work:
$ CREATE ULPA.COM
$ cd RMH$ALLGPDS
$ DEFINE/USER SYS$INPUT SYS$COMMAND ! read from terminal
$ dtr @RMH_UNLOCK_ACCOUNT
$ ULPA:=="@SYS$DISK:[]ULPA.COM"
$ ULPA
...
You may need to replace SYS$DISK:[] with a valid device and directory on your system.
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.
Hope this helps,
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-07-2009 05:36 AM
тАО10-07-2009 05:36 AM
Re: OpenVMS - DTR Command Inside COM File?
Actually just add the two commands:
$ cd RMH$ALLGPD8
$ dtr
to the beginning of your RMH_UNLOCK_ACCOUNT.COM (right above the SET DICTIONARY command)
then (maybe in your LOGIN.COM) add the symbol definition:
$ ulpa :== @dev:[dir]RMH_UNLOCK_ACCOUNT.COM
and you should be set.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-07-2009 05:40 AM
тАО10-07-2009 05:40 AM
Re: OpenVMS - DTR Command Inside COM File?
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.
So building upon your suggestion, adding
$ CD RMH$ALLGPDS
$ DEFINE/USER SYS$INPUT SYS$COMMAND
$ DTR
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...
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-07-2009 06:14 AM
тАО10-07-2009 06:14 AM
Re: OpenVMS - DTR Command Inside COM File?
In general, I'd advise against using a symbol
like this "cd" in a DCL procedure, unless
you're sure that every user of the procedure
has (and always will have) the same
definition for that symbol.
I've seen too many DCL procedures fail like:
%DCL-W-IVVERB, unrecognized command verb - check validity and spelling
\SAY\
because its author had "say" defined:
say == "write sys$output"
and I didn't.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-07-2009 06:51 AM
тАО10-07-2009 06:51 AM
Re: OpenVMS - DTR Command Inside COM File?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-08-2009 03:47 AM
тАО10-08-2009 03:47 AM
Re: OpenVMS - DTR Command Inside COM File?
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 ;)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-16-2009 05:16 AM
тАО10-16-2009 05:16 AM
Re: OpenVMS - DTR Command Inside COM File?
Here is what we came up with:
We created a file ulpa.com
$ set def RMH$ALLGPDS
$ DEFINE/USER SYS$INPUT SYS$COMMAND
$ dtr @RMH_UNLOCK_ACCOUNT
$ set def sys$login
and we added these lines to our login.com file:
$ ulpa :== @DISK$SMSUSER1:[PRDOPER]ulpa.com
$ ulmr :== @DISK$SMSUSER1:[PRDOPER]ulmr.com
These scripts work great now
Thank you again to everyone, but especially thanks to Volker!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-16-2009 06:09 AM
тАО10-16-2009 06:09 AM
Re: OpenVMS - DTR Command Inside COM File?
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.
- It adds a file --> more dependencies
- It has the side effect of forcing a users back to SYS$LOGIN on exit
Why not just use:
$ ulpa :== "dtr @RMH$ALLGPDS:RMH_UNLOCK_ACCOUNT"
That does not change the default directory.
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.
Go into datatrieve and issues:
DTR> SHOW PD_CDD.PDIACCMAS
:
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.
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.
DTR> DEFINE PROCEDURE PD_CDD.RMH_UNLOCK_ACCOUNT
:
DTR> END_PROCEDURE
Now define your dcl command as:
$ ulpa :== "dtr :PD_CDD.RMH_UNLOCK_ACCOUNT"
Good luck!
Hein
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-16-2009 10:28 AM
тАО10-16-2009 10:28 AM
Re: OpenVMS - DTR Command Inside COM File?
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.
Thank you for the info. I'll reply back once I have a correct, working script :)