FTP - GET command in JCL



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

FTP - GET command in JCL

Postby fornanthakumar » Thu Nov 18, 2010 3:20 am

Hi,

I am executing FTP utility in my JCL for copy remote file to host file.

I want to create a file with LRECL=300 BLKSIZE=27900 with specified cylinders of primary and secondary.

I want to do it with FTP - GET commad itself. Is it possible?

I can still able to create the same file with IEFBR14 as previous step of this FTP step but i want to perform this in FTP utility itself.

Please advise.
Regards,
Nanthu.Y.
fornanthakumar
 
Posts: 70
Joined: Fri Oct 22, 2010 1:58 pm
Has thanked: 0 time
Been thanked: 0 time

Re: FTP - GET command in JCL

 

Re: FTP - GET command in JCL

Postby dick scherrer » Thu Nov 18, 2010 4:06 am

Hello,

It won't be in the GET command, but can be in the ftp control statements.

Try this:
quote locsite lrecl=300 blocksize=27900 recfm=fb
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: FTP - GET command in JCL

Postby MrSpock » Thu Nov 18, 2010 6:33 am

Any reason why you don't want to leave the dataset allocation process to a specified DD statement in your job's FTP step? Why is it necessary to have to do this within the FTP commands?

//FTPSTEP  EXEC PGM=FTP,PARM='server port (EXIT=8'
//NETRC    DD   DISP=SHR,DSN=HLQ.NETRC
//FTPFILE  DD   DSN=FTP.DATASET,UNIT=...,DISP=(,CATLG,DELETE),
//         RECFM=...,LRECL=300 BLKSIZE=27900,SPACE=(UNT,(PRI,SEC),RLSE)
//OUTPUT   DD   SYSOUT=*
//INPUT    DD   *
sendsite
ascii
get filename //DD:FTPFILE
qui
/*
//*
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: FTP - GET command in JCL

Postby Robert Sample » Thu Nov 18, 2010 7:09 am

I want to do it with FTP - GET commad itself. Is it possible?
No, it is not possible. The GET command retrieves data -- nothing more, nothing less. You could use QUOTE LOCSITE to define the LRECL, BLKSIZE, and DCB characteristics of the file you want to create on the mainframe, but you cannot do so with the GET statement. You would use QUOTE LOCSITE as long as the FTP job is running on the mainframe -- a QUOTE SITE command would affect the server, not the mainframe. If the FTP is running on the remote server going to your mainframe, you would use QUOTE SITE.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: FTP - GET command in JCL

Postby dick scherrer » Thu Nov 18, 2010 8:03 am

Ooops - don't ya just hate it when ya clone something incorrectly. . . :oops:

I've corrected the error above and will now go quietly. . . .

d
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: FTP - GET command in JCL

Postby madmartinson » Wed May 25, 2011 1:10 am

i too am running a real GET command to get a file. funny thing happened today with another group and they are changing their filenames to align with the conversion 'data day' and month. now everything will ____ the bed. i looked around and saw some SET command options on the web but when I went into QW for this site the FTP commands do not reference a SET command so i can BUILD the first part of the filename, after running the DIR command output to a PDS, then PARSE the last 2 nodes of the 'new' file name ( probably using SS to get it ) to it so I can always get what the geek puts out there.
So, is SETing a variable name taboo on the MF ( i did try it )? I have looked pretty hard for a link to a manual and I always end up with a version that has acronyms that are part of these guys kids name. Point me in the right direction please if you could man.
madmartinson
 
Posts: 3
Joined: Thu Dec 09, 2010 9:08 pm
Has thanked: 0 time
Been thanked: 0 time

Re: FTP - GET command in JCL

Postby Robert Sample » Wed May 25, 2011 1:21 am

Add a step to your job to use a program (in SAS, REXX, or even COBOL) to create the FTP commands in a file. Use that file as the input to the FTP step.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: FTP - GET command in JCL

Postby MrSpock » Wed May 25, 2011 3:52 am

Everything concerning FTP is documented here in the z/OS V1R10.0 Comm Svr: IP User's Guide and Commands manual.
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post