1753546 Members
5520 Online
108795 Solutions
New Discussion юеВ

AIX TO VMS command

 
Jan van den Ende
Honored Contributor

Re: AIX TO VMS command

Michael,

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
Don't rust yours pelled jacker to fine doll missed aches.
The Brit
Honored Contributor

Re: AIX TO VMS command

Jan,
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
Hoff
Honored Contributor

Re: AIX TO VMS command

The COPY /FTP command syntax was first available back in June of 1995, with the release of OpenVMS V6.2.

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.
Bob Blunt
Respected Contributor

Re: AIX TO VMS command

Michael,

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