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 

Syntax for appending data to a file using GET FTP command

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
pvrajesh31
Beginner


Joined: 10 Aug 2004
Posts: 31
Topics: 11

PostPosted: Tue Jun 07, 2005 9:57 am    Post subject: Syntax for appending data to a file using GET FTP command Reply with quote

Hi,

I have to files in server SOURCE-FILE1,SOURCE-FILE2. I need to receive 2 source files into a single destination file using JCL.

I am using following GET command for this after connecting to server.

GET SOURCE-FILE1 'DEST-FILE' (REPLACE
GET SOURCE-FILE2 'DEST-FILE' (REPLACE

due to which only data of second file only moving into destination file.
Is there anyway to append data in 'SOURCE-FILE2' to 'DEST-FILE'.

Can somebody help me out ???

thanx in advance.
_________________
Rajesh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Tue Jun 07, 2005 10:30 am    Post subject: Reply with quote

pvrajesh31,

Use APPEND command instead of GET to append the multiple files to a single file.

Code:

APPEND 'SOURCE-FILE1' 'DEST-FILE'
APPEND 'SOURCE-FILE2' 'DEST-FILE'


Check this link for a detailed explanation of the APPEND command.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/F1A1B910/5.3?DT=20010621083253

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
pvrajesh31
Beginner


Joined: 10 Aug 2004
Posts: 31
Topics: 11

PostPosted: Tue Jun 07, 2005 11:41 am    Post subject: Reply with quote

Hi Kolusu,

But this command appends local file to a foreign file at server. But my requirement is in the reverse way. I want to append foriegn file to a local file.
i.e. in my case 'SOURCE-FILE1' and 'SOURCE-FILE2' are foreign files and 'DEST-FILE' is local file.

Is there any way for this.
_________________
Rajesh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Tue Jun 07, 2005 3:04 pm    Post subject: Reply with quote

pvrajesh31,

Rajesh did you try the above mentioned ftp cards? Btw they work for appending the files on the mainframe also

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Tue Jun 07, 2005 7:52 pm    Post subject: Reply with quote

Seems to me it also would be just as easy to allocate the output dataset to its DD with DISP=MOD, and use two get statements:
Code:

//SYSUT1  DD DSN=DESTFILE,DISP=MOD
//INPUT   DD *
get SOURCE-FILE1 //DD:SYSUT1
get SOURCE-FILE2 //DD:SYSUT1
qui
Back to top
View user's profile Send private message
pvrajesh31
Beginner


Joined: 10 Aug 2004
Posts: 31
Topics: 11

PostPosted: Wed Jun 08, 2005 4:15 am    Post subject: Reply with quote

Hi Superk,

Two GET statements with output dataset as DISP=MOD is working fine.

Thanx a lot.....
_________________
Rajesh
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 -> Job Control Language(JCL) 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