Sending files to AS/400 from Unix

I am trying to send a file from Unix environment to AS400 using Connect Direct, can somebody help me out with some sample scripts / commands for the same.

Also is there is some way to confirm the connectivity established between the servers using Connect Direct, is there some command to find that out.

Am new with Connect Direct so request your help.

Software/Hardware used:
Connect Direct

Answer Wiki

Thanks. We'll let you know when a new response is added.

Connect Direct eh?

I had to do an interface with this onto i5. It wasn’t fun, and it wasn’t pretty.

All I can remember is that we needed folders for the files to be sent/received, and the geeks in commsland had to set up some connectivity.

We eventually found a really really helpful and knowedgeable IBM bloke who hand held a couple of transmissions to prove the systems were connecting before we got into the gore of the actaul data interpretation.

Sorry I can’t recall much more about it – that was then, and this is now.

General comms stuff applies. Take small steps. Expend lots of energy on establishing the connection reliably before you worry about the data.
Ensure plenty of diagnostics and restart for troubleshooting / operators, and build in some metrics on times and turnrounds / number of records etc.


I have made certain changes in the script and was able to move ahead, but have got stuck with some other error now.

The changed scripts are as below.

if [[ -z $1 ]]
echo Please specify the Process file name
echo Syntax: [Process file]
return 0

$CLI_BASE/ndm/bin/direct << EOJ
CSHN01 process snode=CD.AS400.TST snodeid=(username,pwd)

copystep copy from (file=/source/folder/sftptest.txt
to (file=/destination/folder

if (copystep==0) then
taskstep run task pnode sysopts=”echo file send to remote host”
run task pnode sysopts=”echo file cannot send to remote host”

After executing the submit process script, the error am encountering is as below.

Export is done [[: not found

************************************************** ****
* *
* Connectirect for UNIX *
* *
* Copyright (c) 1992, 2006 Sterling Commerce, Inc. *
* Version 3.8.00 *
************************************************** ****

Enter a ‘;’ at the end of a command to submit it. Type ‘quit;’ to exit CLI.

Direct> **** Error returned…

XPAE003I Return Code: 8 Feedback: 0

XPAM001I Return Code: 8 Feedback: 0
Errors Parsing

Connectirect CLI Terminated…

Do let me know if anybody has any clues about this.

Discuss This Question: 2  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Yorkshireman
    The phrase 'Errors parsing' suggests a syntax error ?? maybe
    6,085 pointsBadges:
  • Piyushsanghvi
    Is it possible to CD files from Unix to AS400 using AS400 programming? If yes, I need it urgently. Please any one can help!!!!!!!
    10 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: