MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Ftp to non-existing MVS file

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
app4dxh
Beginner


Joined: 14 Jan 2009
Posts: 2
Topics: 1

PostPosted: Wed Jan 14, 2009 3:26 pm    Post subject: Ftp to non-existing MVS file Reply with quote

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
View user's profile Send private message
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Thu Jan 15, 2009 6:50 am    Post subject: Reply with quote

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
View user's profile Send private message
app4dxh
Beginner


Joined: 14 Jan 2009
Posts: 2
Topics: 1

PostPosted: Thu Jan 15, 2009 8:50 am    Post subject: Reply with quote

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
View user's profile Send private message
expat
Intermediate


Joined: 01 Mar 2007
Posts: 475
Topics: 9
Location: Welsh Wales

PostPosted: Sat Jan 17, 2009 5:32 am    Post subject: Reply with quote

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
View user's profile Send private message
jyoung
Beginner


Joined: 10 Nov 2005
Posts: 36
Topics: 2
Location: Flint, MI

PostPosted: Sat Jan 17, 2009 7:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group