cozagent

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
itdbeu
Posts: 9
Joined: Mon Nov 17, 2008 2:15 pm

cozagent

Post by itdbeu »

Hello

I am running the following to a LINUX BOX

//STEP1 EXEC PROC=COZPROC,
// ARGS='mgochis@170.63.188.175'
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
/*
//STDOUT DD PATH='/u/users/itdbff/sftp.stdout',
// PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
// PATHMODE=SIRWXU
//STDERR DD PATH='/u/users/itdbff/sftp.stderr',
// PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
// PATHMODE=SIRWXU
//STDIN DD *
# this is input to the remote shell
echo "we are running on: " `uname -sr`
//


I am getting the following:

bash: /usr/local/coz/bin/cozagent: No such file or directory
I 've looked for the cozagent but can't find him anywhere. Where does he libe?

Thanks

Mike
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

To use the Co:Z Launcher you need to install the Co:Z Toolkit for target systems. Binaries are available for many systems, but can also be easily built from source.

See "Target system toolkits" here:
http://dovetail.com/downloads/coz/index.html

And installation information here:
http://dovetail.com/docs/coz/install.html#install_unix

Note: The target system toolkit is not required if you are just using SFTP.
itdbeu
Posts: 9
Joined: Mon Nov 17, 2008 2:15 pm

Post by itdbeu »

Hi Dovetail:

I was wondering if you can help me with this. I can't seem to get the DD to work on DTLSPAWN Here is what I have coded:

//RUNCOZ EXEC PROC=DTLSPAWN
//STDIN DD *

# Customize these ...
coz_bin="/usr/local/coz/bin"
remoteuser="mgochis"
server="170.63.188.175"
servercp="ISO8859-1"
remotefile="test1000"
#remotefile="/path/to/file"

# These can be used to read the ssh password from a (secured) dataset
# if you don't want to setup public/private keypairs
#export PASSWD_DSN='//HLQ.PASSWD(SITE1)'
#export SSH_ASKPASS=$coz_bin/read_passwd_dsn.sh
#export DISPLAY=none

ssh_opts="-oBatchMode=no" # allows ssh to use SSH_ASKPASS program
ssh_opts="$ssh_opts -oConnectTimeout=60"
ssh_opts="$ssh_opts -oServerAliveInterval=60"
ssh_opts="$ssh_opts -oStrictHostKeyChecking=no" # accept initial host ke

# Invoke the Co:Z sftp client with an in-line batch of commands
# that downloads a remote file to a local DD.
# Note that "-oBatchMode=no" must be specified before "-b"
# since ssh opts are first-sticky

$coz_bin/cozsftp $ssh_opts -b- $remoteuser@$server <<EOB
lzopts mode=text,servercp=$servercp
get $remotefile //DD:DOWNLOAD
EOB

//DOWNLOAD DD SYS3.COZ.DATA,DISP=NEW,CATLG,DELETE),
// DCB=(LRECL=80,BLKSIZE=6160,RECFM=FB),
// SPACE=(CYL,(8,1,4))


This is what keeps coming out:


DtlSpawnÝN¨: Copyright (C) 2005-2006 Dovetailed Technologies LLC. All rights res
DtlSpawnÝN¨: version 1.1.0 2008-10-20
DtlSpawnÝD¨: region size requested = 0K, Actual below/above limit = 8168K / 1720
DtlSpawnÝD¨: geteuid=1502
DtlSpawnÝI¨: executing progname=login-shell="/bin/sh"
DtlSpawnÝD¨: stdin file opened: //DD:STDIN
DtlSpawnÝD¨: stdout file opened: //DD:STDOUT
DtlSpawnÝD¨: stderr file opened: //DD:STDERR
DtlSpawnÝD¨: spawning progname=/bin/sh
DtlSpawnÝD¨: argvÝ0¨ = /bin/sh
DtlSpawnÝD¨: argvÝ1¨ = -L
DtlSpawnÝD¨: current environment:
DtlSpawnÝD¨: >LIBPATH=/lib:/usr/lib:.<
DtlSpawnÝD¨: >_EDC_ADD_ERRNO2=1<
DtlSpawnÝD¨: >HOME=/u/users/itdbff<
DtlSpawnÝD¨: >_BPX_SHAREAS=MUST<
DtlSpawnÝD¨: >_BPX_SPAWN_SCRIPT=YES<
DtlSpawnÝD¨: >_BPXK_JOBLOG=STDERR<
DtlSpawnÝD¨: >PATH=/bin:/usr/bin<
DtlSpawnÝD¨: spawned /bin/sh (16777451)
DtlSpawnÝI¨: returning with rc=exitcode=1
sftp> lzopts mode=text,servercp=ISO8859-1
mode=text servercp=ISO8859-1
sftp> get test1000 //DD:DOWNLOAD
Fetching /home/mgochis/test1000 to //DD:DOWNLOAD
Co:Z sftp version: 1.1.0-Beta (5.0p1) 2008-10-20
Copyright (C) Dovetailed Technologies, LLC. 2008. All rights reserved.
ZosDatasetÝI¨: Opening dataset DD:DOWNLOAD for write
DatasetHandlerÝE¨: Error in fopen(//DD:DOWNLOAD, wb,type=record,noseek,recfm=*)
unction parameter. (errno2=0xC00B0283)
ZosDatasetÝE¨: Dataset DD:DOWNLOAD open error: EDC5047I An invalid file name was
83)
ZosDatasetÝE¨: last_op=604, error=0x0, msg=
Ý00628¨ Couldn't open local file "//DD:DOWNLOAD" for writing: EDC5047I An invali
errno2=0xC00B0283)

I've tried so many combinations I thought you could help.

Thanks

Mike
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

Your DD statement for DOWNLOAD is incorrect. It should be more like:

//DOWNLOAD DD DSN=SYS3.COZ.DATA,DISP=(NEW,CATLG,DELETE),
// DCB=(LRECL=80,BLKSIZE=6160,RECFM=FB),
// SPACE=(CYL,(8,1))

You were:
- missing DSN= (maybe this caused the rest to be a comment?)
- missing paren on DISP=(
- shouldn't have "3" directory blocks in space parameter.
itdbeu
Posts: 9
Joined: Mon Nov 17, 2008 2:15 pm

Post by itdbeu »

Dovetail

Thanks that fixed it. It was the space parameter that was actually the
culprit.


Thanks again
Mike
Post Reply