DTLSPAWN

Discussion of the COZBATCH utility for z/OS
Post Reply
jupam21
Posts: 12
Joined: Fri Dec 17, 2004 11:24 am

DTLSPAWN

Post by jupam21 »

I am attempting to use the batch interface to go to another z/OS Lpar.
When I attempt it I get the following errors:

DtlSpawnÝN¨: Copyright (C) 2005-2006 Dovetailed Technologies LLC. All rights res
DtlSpawnÝN¨: version 1.2.0 2008-12-11
DtlSpawnÝI¨: executing progname=login-shell="/bin/sh"
DtlSpawnÝI¨: returning with rc=exitcode=255
Co:Z sftp version: 1.2.0 (5.0p1) 2008-12-11
Copyright (C) Dovetailed Technologies, LLC. 2008. All rights reserved.
13.28.07 STC06225 EZZ9302I UNABLE TO ACCESS TRACE FILE STDERR - RC 0008000C
fromdsn(TP.SYSA.CONNECT(SYSA))ÝN¨: 1 records/80 bytes read; 81 bytes written in
FOTS1346 Permission denied, please try again.

fromdsn(TP.SYSA.CONNECT(SYSA))ÝN¨: 1 records/80 bytes read; 81 bytes written in
FOTS1346 Permission denied, please try again.

fromdsn(TP.SYSA.CONNECT(SYSA))ÝN¨: 1 records/80 bytes read; 81 bytes written in
FOTS1373 Permission denied (publickey,password).

Ý00575¨ Connection closed

+++++++++++++++++++++++++++++++++++++++++++++++

My password is in the dataset TP.SYSA.CONNECT. Does it have to be in a special format?

Thanks in advance.

Below is the JCL I am executing:

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

# Customize these ...
coz_bin="/usr/local/coz/bin"
remoteuser="JUPAM21"
server="172.16.1.26"
servercp="ISO8859-1"
remotefile="/u/jupam21/httpd.conf"

# 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='//TP.SYSA.CONNECT(SYSA)'
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 DSN=JUPAM21.HTTPD.CNTL,DISP=SHR
coz
Posts: 391
Joined: Fri Jul 30, 2004 5:29 pm

Post by coz »

Your password dataset must not have any leading spaces, is case sensitive and can have trailing spaces but no trailing line numbers.

Otherwise it's not clear what the problem is. Try running your JCL again with SSH debug turned on (add the -vvv as below):

Code: Select all

$coz_bin/cozsftp $ssh_opts -vvv -b- $remoteuser@$server <<EOB


If you send the trace output to info@dovetail.com, we'll take a look.
jupam21
Posts: 12
Joined: Fri Dec 17, 2004 11:24 am

Post by jupam21 »

Thank you, the password problem was caused by line number being enabled in the password file, so there was a trailing line number. I was able to get past the password issue. However, the file I requested was not sent and the DtlSpawn ended with CC:255. Below is the debug output:

debug2: we sent a password packet, wait for reply

debug1: Authentication succeeded (password).

debug2: fd 4 setting O_NONBLOCK

debug2: fd 5 is O_NONBLOCK

debug2: fd 6 setting O_NONBLOCK

debug1: channel 0: new Ýclient-session¨

debug3: ssh_session2_open: channel_new: 0

debug2: channel 0: send open

debug1: Entering interactive session.

debug2: callback start

debug2: ssh_session2_setup: id 0

debug1: Sending subsystem: sftp

debug2: channel 0: request subsystem

debug2: callback done

debug2: channel 0: open confirm rwindow 0 rmax 32768

debug2: channel 0: rcvd adjust 131072

Ý00247¨ Received message too long 3649413782
debug2: channel 0: read<=0 rfd 4 len 0
debug2: channel 0: read failed

debug2: channel 0: close_read

debug2: channel 0: input open -> drain

debug2: channel 0: ibuf empty

debug2: channel 0: send eof

debug2: channel 0: input drain -> closed

debug1: client_input_channel_req: channel 0 rtype exit-status reply 0

debug2: channel 0: rcvd eof

debug2: channel 0: output open -> drain

debug2: channel 0: obuf empty

debug2: channel 0: close_write

debug2: channel 0: output drain -> closed

debug2: channel 0: rcvd close

debug3: channel 0: will not send data after close

debug2: channel 0: almost dead

debug2: channel 0: gc: notify user

debug2: channel 0: gc: user detached

debug2: channel 0: is dead

debug2: channel 0: garbage collecting

debug1: channel 0: free: client-session, nchannels 1

debug3: channel 0: status: The following connections are open:

#0 client-session (t4 r0 i3/0 o3/0 fd -1/-1)



debug3: channel 0: close_fds r -1 w -1 e 6

debug1: fd 0 clearing O_NONBLOCK

debug2: fd 1 is not O_NONBLOCK

debug1: fd 2 clearing O_NONBLOCK

debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.6 seconds

debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0

debug1: Exit status 0
coz
Posts: 391
Joined: Fri Jul 30, 2004 5:29 pm

Post by coz »

It looks like you aren't establishing an sftp session on the server.
Try connecting to the same server with an sftp client (interactively, either from your workstation or using sftp on z/OS under USS).

This should help us figure out where the problem is.
Post Reply