IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

JCL to FTP a file from one region to an other one


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
twissi

Active User


Joined: 01 Aug 2005
Posts: 105
Location: Somerset, NJ

PostPosted: Thu Mar 30, 2006 1:45 pm
Reply with quote

Hi,

I'm in the look out for a job(JCL) that can FTP (using PGM=FTP) a file from one region to an other one, kindly help.

Thanks,
Cheers, Twissi.
Back to top
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 463

PostPosted: Thu Mar 30, 2006 4:48 pm
Reply with quote

Hi,

Quote:
I'm in the look out for a job(JCL) that can FTP (using PGM=FTP) a file from one region to an other one, kindly help.


I believe you want job to FTP file from one server to another.
Please make search in forum you will get JCL.

Hope this helps

Regards
Rupesh
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Mar 30, 2006 5:11 pm
Reply with quote

Look here in the z/OS V1R7.0 Comm Svr: IP User's Guide and Commands Chapters 3, 4, and 5.

Specifically, see this chapter 4.9 Submitting FTP requests in batch.
Back to top
View user's profile Send private message
twissi

Active User


Joined: 01 Aug 2005
Posts: 105
Location: Somerset, NJ

PostPosted: Thu Mar 30, 2006 7:16 pm
Reply with quote

Hi,

This's not what I was looking for, I knew it already.
I want a job that FTPs a file from one region to a different region(not any windows or unix server) of the same mainframe.

We usually use XMIT to accomplish this function but XMIT is a mannual process and I'm looking to automate it.

Hope this's clear.
Thank you so much for your interest, hoping to get the correct one from you,
Cheers, Twissi.
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 419
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Fri Mar 31, 2006 2:46 am
Reply with quote

any chance that a shared dasd vol for these regions is available? no need to ftp/xmit then
Back to top
View user's profile Send private message
twissi

Active User


Joined: 01 Aug 2005
Posts: 105
Location: Somerset, NJ

PostPosted: Fri Mar 31, 2006 3:21 pm
Reply with quote

Dave,

There is nothing common to these regions, so the only options I can think about is to FTP the file or maybe XMIT it because the regions are on the same mainframe.

Thoughts??

Cheers, Twissi.
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 419
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Fri Mar 31, 2006 7:26 pm
Reply with quote

dump it to tape and read it in as an uncataloged dataset by specifying volser
Back to top
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 290
Location: Basel, Switzerland

PostPosted: Fri Mar 31, 2006 8:06 pm
Reply with quote

hy twissi,

note: with XMIT you don't transfer anything, you just put
a dataset into the mainframe compatible XMIT format,
if you need to transfer this, you also have to use something
like ftp.
ftp uses the tcp/ip address from the target system,
to transfer it, check what is the ipadr/port# for your target...

all other specifications, you can read in the manual as
provided by superk.

martin9

ps: there is no need to know the solution,
just know, where to find the right manual,
where the solution is described.

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/F1A1B950/4.9?DT=20050708142126
Back to top
View user's profile Send private message
twissi

Active User


Joined: 01 Aug 2005
Posts: 105
Location: Somerset, NJ

PostPosted: Tue Apr 04, 2006 5:12 pm
Reply with quote

Hi Martin9,

I've accomplished this task by automating XMIT !! see the syntax below:

Code:

//STEP1    EXEC PGM=IEBGENER                                         
//SYSPRINT DD   SYSOUT=*                                             
//SYSIN    DD   DUMMY                                                 
//SYSUT2   DD   DSN=&TEMP(GO),DISP=(,PASS),UNIT=VIO,                 
// SPACE=(CYL,(1,1,1)),DCB=(RECFM=FB,LRECL=80,BLKSIZE=11440)         
//SYSUT1   DD   *                                                     
PROC 3 NODE USER DSN                                                 
CONTROL MSG LIST CONLIST NOFLUSH                                     
ERROR DO                                                             
 SET &RET = &LASTCC                                                   
 RETURN                                                               
END                                                                   
  /* RECEIVERS USERID SHOULD PREFERABLY BE AN EXISTING USERID OR THE 
  /* XMIT LOG DATASET WILL BE CATALOGED AT THE RECEIVER IN THE MASTER
  /* CATALOG                                                         
XMIT &NODE/&USER DSNAME('&DSN') NONOTIFY NOLOG                       
//*                                                                   
//TSO      EXEC PGM=IKJEFT01,REGION=4096K,DYNAMNBR=50                 
//SYSTSPRT DD   SYSOUT=*                                             
//SYSPROC  DD   DSN=&TEMP,DISP=(OLD,DELETE)                           
//SYSTSIN  DD   *                                                     
%GO AMVS123 IDHERE  E13371.?MENDV.TEMP(FTP)                           
//*     ^            ^          ^                                                 
//*     !              !           !                                                 
//*     !              !           TRANSMITTED DATASET                               
//*     !              RECEIVER                                                 
//*     RECEIVING NODE (DESTID)     


Like this we also need a receiving job at the receiving node.

Thank you all for your help.
Cheers,Twissi. icon_smile.gif
Back to top
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 290
Location: Basel, Switzerland

PostPosted: Tue Apr 04, 2006 5:34 pm
Reply with quote

hy twissi,

your solution looks fine,
BUT NOTE THIS.
with this job you transfer nothing.
XMIT is a transferable mainframe format.
after you have created this XMIT file using TSO-command XMIT,
you still have to transfer it to somewhere.
now your XMIT-file is still on your partition, ok?

but now, you will be able to transfer it to anywhere,
using ftp for example.

martin9
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Apr 04, 2006 5:42 pm
Reply with quote

No, not true. XMIT is NJE (Network Job Entry). I have used the same code, and it does work to transfer a dataset from one node to the other.
Back to top
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 290
Location: Basel, Switzerland

PostPosted: Tue Apr 04, 2006 5:59 pm
Reply with quote

hy,

ok, but this means, this file will be transfered only if the target node
is really known. therefore i suggest, twissi does not want to transfer
it to another system outside. (NJE is the internal mainframe network
job entry...).
we use xmit only to send data files to other customers or vendors
which also have a mainframe. inhouse it is easier to use any ftp.

but nevertheless, thanks for your explanation...

martin9
Back to top
View user's profile Send private message
twissi

Active User


Joined: 01 Aug 2005
Posts: 105
Location: Somerset, NJ

PostPosted: Tue Apr 04, 2006 6:51 pm
Reply with quote

Hi Martin9,

I guess there was a bit of confution for you, superk's solution was what exactly I was looking for!

And I'm sure you would definitely have given me the solution had you understood the requirement correctly.

Thanks to all of you.
Cheers, Twissi.
Back to top
View user's profile Send private message
RaviTejaG

New User


Joined: 21 May 2010
Posts: 8
Location: Hyderabad

PostPosted: Thu Dec 30, 2010 4:30 pm
Reply with quote

Hi Twissi,
i read your post and want some explanation from you,

can you explain the use of following statements,

//SYSUT1 DD *
PROC 3 NODE USER DSN
CONTROL MSG LIST CONLIST NOFLUSH
ERROR DO
SET &RET = &LASTCC
RETURN
END

and
%GO AMVS123 IDHERE E13371.?MENDV.TEMP(FTP)

Thank You,
RaviTeja.G[/b]
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Dec 30, 2010 4:33 pm
Reply with quote

RaviTejaG

The topic to which you have replied has been happily dormant for over 4 and a half years.

Do you really think that you will get a response ?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Dec 30, 2010 4:36 pm
Reply with quote

Hope for you twissi is still around after 4 years and some months.
Back to top
View user's profile Send private message
RaviTejaG

New User


Joined: 21 May 2010
Posts: 8
Location: Hyderabad

PostPosted: Thu Dec 30, 2010 4:49 pm
Reply with quote

Hi expat,
icon_rolleyes.gif i have faith on this forum that's y i posted.
Regards,
RaviTeja.G
Back to top
View user's profile Send private message
RaviTejaG

New User


Joined: 21 May 2010
Posts: 8
Location: Hyderabad

PostPosted: Thu Dec 30, 2010 4:53 pm
Reply with quote

i am not asking only Twissi ,if anyone knows about it can explain or can give me pointers.
Regards,
RaviTeja.g
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Dec 30, 2010 4:59 pm
Reply with quote

unfortunately twissi is probably the only person who can tell us the code of the CLIST or REXX called GO
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Dec 30, 2010 8:28 pm
Reply with quote

Hello,

Rather that work thru the old solution that may or may not do what you want, you should get more useful replies if you post what you are trying to do and where there are questions/problems. . .
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top