Page 1 of 1

FTP - GET command in JCL

PostPosted: Thu Nov 18, 2010 3:20 am
by fornanthakumar
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.

Re: FTP - GET command in JCL

PostPosted: Thu Nov 18, 2010 4:06 am
by dick scherrer
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

Re: FTP - GET command in JCL

PostPosted: Thu Nov 18, 2010 6:33 am
by MrSpock
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
/*
//*

Re: FTP - GET command in JCL

PostPosted: Thu Nov 18, 2010 7:09 am
by Robert Sample
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.

Re: FTP - GET command in JCL

PostPosted: Thu Nov 18, 2010 8:03 am
by dick scherrer
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

Re: FTP - GET command in JCL

PostPosted: Wed May 25, 2011 1:10 am
by madmartinson
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.

Re: FTP - GET command in JCL

PostPosted: Wed May 25, 2011 1:21 am
by Robert Sample
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.

Re: FTP - GET command in JCL

PostPosted: Wed May 25, 2011 3:52 am
by MrSpock
Everything concerning FTP is documented here in the z/OS V1R10.0 Comm Svr: IP User's Guide and Commands manual.