CoZBatch fopen error

A discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
sedprm
Posts: 4
Joined: Thu Feb 16, 2006 4:38 pm
Location: Canada

CoZBatch fopen error

Post by sedprm » Tue Oct 27, 2015 3:22 pm

Can anyone help, getting a strange error trying to use CozSFTP 3.5.1 with a userid that hasn't used it before.

CoZBatchÝT¨: <- setupEnvironment()
CoZBatchÝT¨: -> openDDs()
CoZBatchÝE¨: ./CoZBatch.C(398) - fopen(//DD:STDIN,rt) - Ý21¨ EDC5021I The file attributes for open create an invalid combination. (errno2=0xC00B020F)
CoZBatchÝT¨: <- openDDs()
CoZBatchÝT¨: <- run()
CoZBatchÝW¨: an error occurred; returning rc=101

STDIN is defined as follows, nothing unusual about it, it's a PDS with RECFM=FB, LRECL=80, BLKSIZE=3200:

//STDIN DD DISP=SHR,DSN=SYSP.GB.COZ.SCOZPARM(SFTPIND)

sedprm
Posts: 4
Joined: Thu Feb 16, 2006 4:38 pm
Location: Canada

Re: CoZBatch fopen error

Post by sedprm » Tue Oct 27, 2015 3:44 pm

Replying to my own post, the problem was in the concatenation:

//STDIN DD DISP=SHR,DSN=&SFTPIND
// DD DDNAME=SFTPIN

The dataset that SFTPIN pointed to had inexplicably been created (not by myself I hasten to add!) with LRECL=91,BLKSIZE=27937. Recreating this dataset with LRECL=80 resolved the fopen error.

CSBL81
Posts: 1
Joined: Fri Oct 25, 2013 7:20 am

Re: CoZBatch fopen error

Post by CSBL81 » Thu Apr 22, 2021 12:52 pm

Good afternoon,
I have that same error message but what I find weird is that in the JCL where this step (STEP2) for removing a file fails, there's a previous step (STEP1) that gets that file to Mainframe and it works fine.
How can this be?

STEP1 OUTPUT:

cozsftp> lzopts mode=text
mode=text
cozsftp> lzopts mode=text
mode=text
cozsftp> CD /XPTO/XPTY
cozsftp> GET FILE1.txt //DD:MYE1
Fetching /XPTO/XPTY/FILE1.txt to //DD:MYE1
ZosSettingsÝI¨: Transfer options: clientcp=IBM-1047,gdgnt,mode=text,servercp=ISO8859-1,trim
ZosDatasetÝI¨: Opening dataset DD:MYE1 for write
ZosDatasetÝI¨: Closing dataset //HQL1.APL.STEP1.GET - 1200530 bytes received, 241527 records
written
CoZBatchÝI¨: returning rc=exitcode=0


STEP2 OUTPUT:

CoZBatchÝN¨: version: 6.2.1 2021-01-15
CoZBatchÝN¨: Copyright (C) Dovetailed Technologies, LLC. 2005-2021. All rights r
<- ()
CoZBatchÝE¨: ./CoZBatch.C(404) - fopen(//DD:STDIN,rt) - Ý21¨ EDC5021I The file attributes for open create an invalid
combination. (errno2=0xC00B020F)
CoZBatchÝW¨: an error occurred; returning rc=101
******************************** BOTTOM OF DATA ********************************

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

Re: CoZBatch fopen error

Post by dovetail » Thu May 06, 2021 3:34 pm

This is a problem where the IBM C library cannot open DD STDIN.

Check this DD in your JCL. If you have a concatenation, check that it is valid (the datasets use compatible RECFM/LRECL).

Post Reply