File pattern specific options

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
marko_kruz
Posts: 4
Joined: Tue Oct 18, 2011 1:44 pm

File pattern specific options

Post by marko_kruz »

Hi,

I'm trying to use file pattern specific options as indicated in Appendix B.3 of Co:Z SFTP - User's Guide.

Within /etc/ssh/cozsftp_config I type the following lines,

Code: Select all

pattern: *.bin
mode=binary
When I issue the command /usr/local/coz/bin/cozsftp user@server it displays:

Code: Select all

Co:Z SFTP version: 1.9.0 (5.0p1) 2011-05-09
Copyright (C) Dovetailed Technologies, LLC. 2008. All rights reserved.
ZosSettings[E]: Unknown option: 'pattern: *.bin'
Connecting to 180.176.102.243...
Password:
There is additional settings I have to set up? What am I doing wrong?

It is the complete file:

Code: Select all

# This file determines the default configuration of every Co:Z SFTP client session.
# in order to take effect, it must be readable by the calling process and be located
# at /etc/ssh/cozsftp_config

# Client session settings are determined in the following priority order:
# 1. The fixed: section of this file (highest priority and non-modifiable)
# 2. The interactive command "lzopts"
# 3. The environment variable SFTP_ZOS_OPTIONS
# 4. The default: section of this file (lowest priority)

pattern: *.bin
mode=binary

# Fixed section
fixed:
mode=text

# Specify fixed settings following this line

# Default section
default:
# Specify default settings following this line
# -- for additional info on the following option, see IBM APAR OA34819
# -- this setting applies to the cozsftp client only.
ssh-le-options=HEAP(12M,1M,,FREE),ENVAR("_CEE_REALLOC_CONTROL=256K,25")
Thanks in advance
coz
Posts: 392
Joined: Fri Jul 30, 2004 5:29 pm

Re: File pattern specific options

Post by coz »

Marko,

File patterns are 1.10.0 (and later) feature. You'll want to get the latest version of Co:Z to use them

--Steve
marko_kruz
Posts: 4
Joined: Tue Oct 18, 2011 1:44 pm

Re: File pattern specific options

Post by marko_kruz »

I got the new version, now it works, thank you so much.
atrivino
Posts: 17
Joined: Wed Jul 13, 2011 9:28 am

Re: File pattern specific options

Post by atrivino »

Can one override the pattern setting for a dataset?
coz
Posts: 392
Joined: Fri Jul 30, 2004 5:29 pm

Re: File pattern specific options

Post by coz »

Yes -- if you start the pattern with two slashes (//), it will be used to match dataset names.
atrivino
Posts: 17
Joined: Wed Jul 13, 2011 9:28 am

Re: File pattern specific options

Post by atrivino »

Perhaps I was a bit vague in my question.

Let say within /etc/ssh/cozsftp_server_config, we have the following:

pattern: //ABC.DEF.G*
lrecl=27000,recfm=vb,servercp=IBM-1047,mode=text

How could one override these setting for ABC if I wanted to upload a zip file in binary mode?
ls /+mode=binary from the client doesn't seem to change anything.
coz
Posts: 392
Joined: Fri Jul 30, 2004 5:29 pm

Re: File pattern specific options

Post by coz »

In your example, any transfer matching the dataset pattern //ABC.DEF.G* will adopt the options specified for the pattern. The command line settings are overridden by the pattern settings.

This was designed so that constant modification to the current option set would not be required when a well known pattern was chosen.

So, in your case, you'll need to remove the pattern if those options don't apply in all transfer cases.
Post Reply