View previous topic :: View next topic |
Author |
Message |
app4dxh Beginner
Joined: 14 Jan 2009 Posts: 2 Topics: 1
|
Posted: Wed Jan 14, 2009 3:26 pm Post subject: Ftp to non-existing MVS file |
|
|
I would like to send a file from a Unix platform to a Mainframe MVS system. If the Mainframe file does NOT exist, I do want ftp to fail and not create a file with default record length.
In the real world, the Mainframe file will be allocated prior to the ftp with correct attributes, however things can happen and dataset could get deleted.
Currently my ftp command looks like this:
IP Addrees
login
pasword
locsite trail
cd /unix/directory
get Unix_filename 'Mainframe_Filename'
quit
This Ftp is succesfully, and file is created on the Mainframe platform however with different record length than sending file. I do NOT want to speciaficy any file attributes on the ftp command as this becomes a maintenance issue.
Thanks in advance for your help. |
|
Back to top |
|
 |
expat Intermediate

Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
|
Posted: Thu Jan 15, 2009 6:50 am Post subject: |
|
|
It looks like you are running the FTP from the mainframe. If you are .....
Why not allocate it during the FTP step and use Code: |
GET 'REMOTE DATASET NAME' //DD:DDNAME
|
_________________ If it's true that we are here to help others,
then what exactly are the others here for ? |
|
Back to top |
|
 |
app4dxh Beginner
Joined: 14 Jan 2009 Posts: 2 Topics: 1
|
Posted: Thu Jan 15, 2009 8:50 am Post subject: |
|
|
Yes, I had thought about that, however the file is allocated in a different JCL. As mentioned, I do not want to code LRECL on the GET command.
I could delete and redefine it in the Ftp step but I was just wondering if there was an ftp command that would force the ftp to fail when the receiving file did not exist.
Thanks for your reply..... |
|
Back to top |
|
 |
expat Intermediate

Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
|
Posted: Sat Jan 17, 2009 5:32 am Post subject: |
|
|
But if the LRECL changes, you will have to change it in some code somewhere so whatever way you go the maintenance issue still rears its head. _________________ If it's true that we are here to help others,
then what exactly are the others here for ? |
|
Back to top |
|
 |
jyoung Beginner
Joined: 10 Nov 2005 Posts: 36 Topics: 2 Location: Flint, MI
|
Posted: Sat Jan 17, 2009 7:35 pm Post subject: |
|
|
Could you put a check in to see if the file exist? If not then bypass the FTP step. I am with expat though, create the file in the ftp step with the lrecl you need. |
|
Back to top |
|
 |
|
|