- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- AIX TO VMS command
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
Forums
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
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
тАО01-19-2009 08:08 AM
тАО01-19-2009 08:08 AM
AIX TO VMS command
I have a task to convert a unix ftp connection string to a vms equivalent. I could not see what the print or "|" pipe equivalent would be.
Here is the unix connection string.
SET command = CONCAT ( "print " , quote , "open " , remote_domain , "\n user " ,
remote_username , " " , remote_password ,"\ncd Report_Test","\nput " , fname ,
quote , " | ftp -i -n" )
Any help or direction you can give would greatly be appreciated.
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2009 08:31 AM
тАО01-19-2009 08:31 AM
Re: AIX TO VMS command
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2009 08:39 AM
тАО01-19-2009 08:39 AM
Re: AIX TO VMS command
It looks like what you really want to do is create a (temporary) command file that will start ftp, login as a specified user, change to the Report_Test director, and put a specified file.
In order to do this you first tell us what your internet stack is (TCP/IP Services, MultiNet or TCPware), so that the method that a command procedure interacts with FTP can be determined.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2009 08:46 AM
тАО01-19-2009 08:46 AM
Re: AIX TO VMS command
Thanks for your response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2009 09:06 AM
тАО01-19-2009 09:06 AM
Re: AIX TO VMS command
you're trying to solve, rather than asking
how to translate an implementation of
something from another environment.
I may be woefully ignorant, and I don't deal
with AIX much these days, but I don't
recognize SET and CONCAT as generic UNIX
shell keywords. I can guess what the intent
is, but it's still a guess, and to what
you're actually talking here is a mystery (to
me, at least).
If all you wish to do is use FTP to fetch a
file from somewhere, then I'd also suggest
COPY /FTP. Wget would be another
possibility, and probably cURL, too, but they
don't come with VMS, and you could probably
have been using them on AIX, too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2009 09:29 AM
тАО01-19-2009 09:29 AM
Re: AIX TO VMS command
drop program a_test_dcl_commands_a go
create program a_test_dcl_commands_a
prompt
"Output to File/Printer/MINE" = "MINE" ;* Enter or select the printer or file name to send this report to.
with OUTDEV
select into $outdev
from person p
with counter,maxrec=1
;PHAMARDOWN_.PS
set fname = concat("test",".ps")
;set mar_rpt_data->output_device = fname
;call PrintMarRpt (0)
;Set Remote FTP domain
set remote_domain = "xx.xx.xx.xxx"
set remote_username = "xxxxx"
set remote_password = "xxxxxxx"
set quote = '"'
SET CD_CCLUSR = "set def ccluserdir:"
SET LEN =SIZE(TRIM(CD_CCLUSR))
SET STATUS=0
CALL DCL(CD_CCLUSR,LEN,STATUS)
FREE SET command
SET command = CONCAT ( "write " , quote , "open " , remote_domain , "\n user " ,
remote_username , " " , remote_password ,"\ncd Cerner_Report_Test","\nput " , fname ,
quote , " | ftp -i -n" )
SET LEN = size(trim(command))
SET status = 0
CALL DCL(command,LEN,status)
CALL ECHO(command)
end
go
When I run the above program I get this message from our backend prompt.
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
\|\
write "open 10.101.227.81\n user cerner CernerUHS\ncd Cerner_Report_Test\nput test.ps" | ftp -i -n
76357:062684 A_TEST_DCL_COMMANDS_A Cost 1.24 Cpu 0.02 Ela 4.96 Bio 581 Dio 20 O0M0R0 P1R2Z2 S1,1
Command executed!
1)
I had changed "print" to "write" becuase I was getting this message.
Rec: 1, 2 Row: 1 Qual: 1 Len: 12
%DCL-W-MAXPARM, too many parameters - reenter command with fewer parameters
\|\
print "open 10.101.227.81\n user cerner CernerUHS\ncd Cerner_Report_Test\nput test.ps" | ftp -i -n
76357:062765 A_TEST_DCL_COMMANDS_A Cost 1.22 Cpu 0.02 Ela 4.54 Bio 581 Dio 15 O0M0R0 P1R2Z2 S1,1
Command executed!
1)
The "pipe" seems to be a problem. I am do not have the experience with command lang's with either vms or aix.
Thanks for your response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2009 09:36 AM
тАО01-19-2009 09:36 AM
Re: AIX TO VMS command
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2009 09:40 AM
тАО01-19-2009 09:40 AM
Re: AIX TO VMS command
ftp -i -n | print "open 10.101.227.81\n user cerner CernerUHS\ncd Cerner_Report_Test\nput test.ps"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2009 10:10 AM
тАО01-19-2009 10:10 AM
Re: AIX TO VMS command
$ pipe sh system | search sys$input "swapper"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2009 10:38 AM
тАО01-19-2009 10:38 AM
Re: AIX TO VMS command
> command lang's with either vms or aix.
Apparently. Among other things, "ftp -i"
may not be the best way to start.
HELP FTP
> The "pipe" seems to be a problem.
Probably not the biggest one. The VMS DCL
command line interpreter differs from a UNIX
shell, and the VMS FTP client (most likely)
differs from an AIX FTP client. It might
make more sense to start with DCL, and try
to create a command which does what you want,
and _then_ try to figure out how to get the
Cerner stuff to execute that command.
For fun, try this, too:
TCPIP SHOW VERSION
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2009 11:40 AM
тАО01-19-2009 11:40 AM
Re: AIX TO VMS command
Never ever even SAW Cerner system or application, but if
>>>
write "open 10.101.227.81\n user cerner CernerUHS\ncd Cerner_Report_Test\nput test.ps" | ftp -i -n
<<<
is what it seems to me: a sequence of commands to be executed at DCL level,
AND assuming Cerner generates a line break for "\n" (as it seems to have done)
then I would try putting the ftp command first, then a linefeed, then the various ftp sub-commands. Giving:
===
write "ftp -i -n \nopen 10.101.227.81\n user cerner CernerUHS\ncd Cerner_Report_Test\nput test.ps"
===
orth a try perhaps, but it IS a lot of assuming from my part!
Good luck
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2009 12:25 PM
тАО01-19-2009 12:25 PM
Re: AIX TO VMS command
Consider yourself fortunate (to have never heard of Cerner that is!)
Michael,
The simplest way to handle this is to write a dcl script (or have your program write the script) and then execute it.
e.g. If you are running TCPWare
HostName = "ftp.host.com" (or similar)
Par1 = Username
Par2 = Password
File_Name = Name of file to be transfered.
$ Open/Write FTP_Script FTP_Out_Script.com
$ Write FTP_Script "$ ftp ''HostName' ''Par1' " + Par2
$ Write FTP_Script "cd in"
$ Write FTP_Script "dir"
$ Write FTP_Script "binary"
$ Write FTP_Script "put ''File_name'"
$ Write FTP_Script "dir"
$ Write FTP_Script "bye"
$ Write FTP_Script "$!"
$ Write FTP_Script "$ Exit"
$!
$ Close FTP_Script
$ Set Verify
$!
$! Step 3. Execute the FTP script and transfer the file.
$!
$ @FTP_Out_Script
$ Write sys$output "''f$time()'>>> Transfer Process completed."
Note if you are using TCPIP Services, then first line would be;
$ Write Sys$Output FTP_Script "$ ftp ''Host_Name' /user=''Par1'" /pass=" + Par2
You will have to mess about with the syntax if username and/or password are mixed-case.
Good Luck
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2009 12:45 PM
тАО01-19-2009 12:45 PM
Re: AIX TO VMS command
Something akin to the following one-line DCL command can easily and more reliably entirely replace the technique of using ftp prompting and building an externally-invoked DCL procedure.
The basic syntax parallels that of the DCL command COPY, including the ability to use a username and password and node specification and directory specification. To wit, the command structure:
$ COPY /FTP /BINARY file host"user pass"::file
The most interesting bit here is probably whether you need to double-quote the target filespec here. If it contains Unix syntax for the filename or the directory, then you typically will need to place that part of the parameter into double quotes. Foreign-format file specifications typically need to be double-quoted.
Another option is to install gnv and run a bash shell script within that. gnv is mostly compatible with a Unix bash shell, and can allow you to use the same code in both places. A variation of this approach is to use Perl on both platforms, or such; to use common languages and tools in both places.
And yet another option here (for the transfer itself) is sftp, which is rather more secure, far easier to punch through firewalls, and can be used with digital certificates and no-password logins and such.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2009 04:12 PM
тАО01-19-2009 04:12 PM
Re: AIX TO VMS command
While it might sound overly simplistic, have you considered contacting Cerner directly to see if they have a solution to your question? Few of the folks here speak Cerner but there are still people who work in support at Cerner that have spoken OpenVMS at some time in their career.
If you had a set of pure AIX (or other platform) commands to use as a basis that might help, but wrapping your request in CernerSpeak really muddies the water. A few of us might have understood if you had asked for help using a MUMPS script as a basis, but Cerner is a whole different animal.
Can you even access a simpler AIX shell than the Cerner one on your system? I know that the Cerner systems I've supported that were OpenVMS-based could access DCL but I know nothing about their implementation on AIX. So far we've only been able to piece together that you're moving a ".dat" file of some nature...
bob