sFTP into mainframe to trigger CA7 batch job

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
infaddict
Posts: 3
Joined: Wed Feb 13, 2013 4:55 am

sFTP into mainframe to trigger CA7 batch job

Post by infaddict »

Hi everyone, first post so go easy on me! In my mainframe shop we have several Co:Z products, but not sure if my query relates to SFTP or another product.

We are receiving files from other systems (unix) onto the mainframe via sFTP and this is working fine. I have 2 question :

1) Is it possible for the arrival of the file via sFTP to trigger a batch job in our CA7 scheduling system? From reading up on CA7, it only reacts if a SMF type 15 record is created. I am unsure of sFTP / Co:Z creates this type of SMF record when writing to a file.


2) Is there a central log of all incoming activity for sFTP that I can search on the mainframe? This will help my support team to search for certain DSN names etc.


Thanks in advance!
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: sFTP into mainframe to trigger CA7 batch job

Post by dovetail »

Co:Z SFTP uses standard interfaces for allocating and creating datasets, so SMF15 records should be cut for datasets that are created or updated.

Also, Co:Z SFTP canl create FTP-compatible SMF119 records, and these can be dynamically received by a program using a Unix-domain socket api.
These can be used by customer or vendor "Managed File Transfer" products for automation.

Finally, Co:Z SFTP server supports FTP-compatible user exits. The CZPOSTPR exit can be used to write a message to syslog for automation of each file transfer.

By default, Co:Z SFTP server logs information to a session-specific file and not a common file. This is best since it allows a remote SFTP client to do a "get /+error.log" to download z/os error log details for the current session.
infaddict
Posts: 3
Joined: Wed Feb 13, 2013 4:55 am

Re: sFTP into mainframe to trigger CA7 batch job

Post by infaddict »

Hi, thanks very much for the response. Today I have carried out several tests in our UAT environment and can't get our CA7 job to trigger at all. The dataset trigger is simply not firing in CA7. I have tried changing the type of DSN trigger from NORM to PERM (after some searching on internet) and have also tried with the target dataset existing and not existing.

Can you suggest any way forward to investigate? Thanks in advance
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: sFTP into mainframe to trigger CA7 batch job

Post by dovetail »

If you can confirm that CA7 uses SMF15 records, you might want to check SMF to see if there are SMF15 records for the datasets that you are creating / updating.
infaddict
Posts: 3
Joined: Wed Feb 13, 2013 4:55 am

Re: sFTP into mainframe to trigger CA7 batch job

Post by infaddict »

Ok I have proved that sFTP is creating record type 15's in SMF. However, due to the way CA7 is used in my installation, it will not use direct dataset triggering correctly. So the problem is CA7 and not sFTP in this case.

Is it possible to use sFTP to trigger a process on the mainframe in another way? For example, trigger a JES job or run a program with a parameter?

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

Re: sFTP into mainframe to trigger CA7 batch job

Post by dovetail »

The Co:Z SFTP server supports FTP-compatible user exists. the CZPOSTPR exit can be used to write a message to syslog on file transfer completion that can be picked up by automation.

see: http://dovetail.com/docs/sftp/coz_sftp_exits.pdf

Both the client and the server will write FTP-compatible SMF119 records. You can also have a user-written program that can receive these in real time over a Unix-domain socket.

see: http://dovetail.com/docs/sftp/smf-support.html#d0e4241

BTW: If your site has or is evaluating an Enterprise License and Support agreement, please contact us via email or open a ticket. We will be happy to assist you to write one of these programs.
PrakashB
Posts: 1
Joined: Fri May 17, 2019 12:45 am

Re: sFTP into mainframe to trigger CA7 batch job

Post by PrakashB »

Did you get a solution for this? I am facing the same problem.
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: sFTP into mainframe to trigger CA7 batch job

Post by dovetail »

Co:Z SFTP also supports "notifications", where you can customize messages to the system log for completed (and failed) transfers. This was designed to be hooked into automation triggers, using the message id of your choice.
Post Reply