1752777 Members
6240 Online
108789 Solutions
New Discussion юеВ

AIX TO VMS command

 
Michael Boynay
Occasional Contributor

AIX TO VMS command

Hello,

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!
13 REPLIES 13
Wim Van den Wyngaert
Honored Contributor

Re: AIX TO VMS command

Try help copy/ftp.

Wim
Wim
Richard Whalen
Honored Contributor

Re: AIX TO VMS command

VMS has a PIPE command that performs the PIPE function.

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.
Michael Boynay
Occasional Contributor

Re: AIX TO VMS command

I would have to find out more regarding you questions about the internet stack from another resource. I did fail to mention the connection string is being called from the DCL command.

Thanks for your response
Steven Schweda
Honored Contributor

Re: AIX TO VMS command

It might be useful to describe the problem
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.
Michael Boynay
Occasional Contributor

Re: AIX TO VMS command

I am using Cerner CCL language. I have a program that currently generates a .dat file that I need to ftp over to a third party system. Here is a test program I have been working with to get the functionality down.

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

marsh_1
Honored Contributor

Re: AIX TO VMS command

pipe commands in vms have to have 'pipe' at the start of the line of piped commands.

HTH

Michael Boynay
Occasional Contributor

Re: AIX TO VMS command

Thanks for your response. Are you saying like

ftp -i -n | print "open 10.101.227.81\n user cerner CernerUHS\ncd Cerner_Report_Test\nput test.ps"
marsh_1
Honored Contributor

Re: AIX TO VMS command

e.g :-

$ pipe sh system | search sys$input "swapper"
Steven Schweda
Honored Contributor

Re: AIX TO VMS command

> I am do not have the experience with
> 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