Hi,
This may not be the best approach. So, you are welcome to poke holes into. What I need is an xml file on one distributed server to be copied to a second distributed server. Right now, I have a coz step running on the mainframe to execute the script that creates the xml. I'm thinking to stay within the same job, that I have a second step to execute a coz sftp process to copy the xml file from one machine to the other. I would like to know how to do that using a coz sftp step. I have given a little thought to add an sftp within the executing script but that involves sftp setup between the two distributed machines and I already have coz running against both machines and wanted to leverage it if possible. Any insight is appreciated, especially on eve of the New Year. Happy New Year to you.
SFTP how to question
Re: SFTP how to question
Are you using Co:Z Launcher to execute the script on the first server that creates the XML?
If so, then in that same Co:Z Launcher shell script, you can copy the xml file back to a z/OS temporary data set (or file) using todsn.
Then, you can have a second Co:Z SFTP step that sends the file to the second server.
(Also, since you are an Enterprise Support customer, please consider opening a ticket).
If so, then in that same Co:Z Launcher shell script, you can copy the xml file back to a z/OS temporary data set (or file) using todsn.
Then, you can have a second Co:Z SFTP step that sends the file to the second server.
(Also, since you are an Enterprise Support customer, please consider opening a ticket).
Re: SFTP how to question
Thanks for the response. How would I deal with the unknown record length of an xml file?
I'm not part of the support group that owns the Coz support information (including ids). And I find it takes much longer to work through them. I've asked for an id but have been denied because the support is based on a finite number of tickets allowed per year. Essentially, they guard them closely. lol
I'm not part of the support group that owns the Coz support information (including ids). And I find it takes much longer to work through them. I've asked for an id but have been denied because the support is based on a finite number of tickets allowed per year. Essentially, they guard them closely. lol
Re: SFTP how to question
If you are putting XML into a data set, then you have two choices:
- use newline characters in the XML to break logical records in the data set. Use RECFM=VB with LRECL >= than the longest that you expect.
You could use the "overflow=wrap" rule so that lines that are two long are broken onto multiple records, but this might cause problems if the break occurred in the middle of a tag name etc.
- use linerule=none so that the records are just filled up and record boundaries are ignored. The program that processes the XML would also have to ignore record terminators.
PS> We do not have any limit on the number of tickets that can be opened by a support customer.
- use newline characters in the XML to break logical records in the data set. Use RECFM=VB with LRECL >= than the longest that you expect.
You could use the "overflow=wrap" rule so that lines that are two long are broken onto multiple records, but this might cause problems if the break occurred in the middle of a tag name etc.
- use linerule=none so that the records are just filled up and record boundaries are ignored. The program that processes the XML would also have to ignore record terminators.
PS> We do not have any limit on the number of tickets that can be opened by a support customer.
Re: SFTP how to question
Say, does todsn support writing to an OMVS file? Would this help guard against potentially long records?
ps. I have asked to talk with the primary contact for the coz software.
ps. I have asked to talk with the primary contact for the coz software.
Re: SFTP how to question
No, todsn does not support writing to Unix files