Issue in fetching the files using MGET



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

Issue in fetching the files using MGET

Postby Papya013 » Thu Mar 29, 2018 12:15 pm

Hi Team,

I have a requirement from my business user to get multiple files from the FTP on Mainframe GDG files.

I tried using the below mentioned code. But The GDG file is not getting created.

LOCSITE REC=FB LR=80 BL=27920    
lcd 'SETT'                      
MGET S8* 'SETT.S8.FTP.IN.BST(+1)'


Could you please let me know if any suggestions to correct the issue.

Regards,
Balesh GG
Papya013
 
Posts: 32
Joined: Wed Nov 06, 2013 6:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Issue in fetching the files using MGET

 

Re: Issue in fetching the files using MGET

Postby Robert Sample » Thu Mar 29, 2018 5:06 pm

From the IP User's Guide and Commands manual for version 2.1 of z/OS:
Before you specify a (+nnn) value to create a new GDS, issue the following command:

SITE DCBDSN=model

This subcommand specifies an MVS™ data set to be used as a model. The model must have a DSORG of PS. The other DCB characteristics of the data set are not checked.
Notes:

Failure to have a valid DCBDSN before trying to create a new GDS might cause FTP or ALLOCATION to fail or to return unpredictable results.
If you issue a SITE DCbdsn LRecl BLKsize command before the creation of a new data set, the LRecl and BLKsize parameters on the SITE command override the LRecl and BLKsize parameters on the DCbdsn command.
Depending upon your FTP, you may need LOCSITE instead of SITE. And you may need to put QUOTE before either command. It is not clear how you expect the MGET to work -- do you think each retrieved file from the server system will be a new generation?
Robert Sample
Global moderator
 
Posts: 3507
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 248 times

Re: Issue in fetching the files using MGET

Postby Papya013 » Thu Mar 29, 2018 5:34 pm

Hi Robert,

Thanks for your quick response.

Could you please let me know the syntax for the statement "And you may need to put QUOTE before either command".

Yes, each file retrieved from the server is expected to be in a new generation.

Regards,
Balesh GG
Papya013
 
Posts: 32
Joined: Wed Nov 06, 2013 6:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Issue in fetching the files using MGET

Postby Robert Sample » Thu Mar 29, 2018 7:45 pm

QUOTE SITE and QUOTE LOCSITE are used to pass site or local site commands without the FTP server on the other end of the connection attempting to deal with them. The QUOTE says for the FTP server to not attempt to parse / process the commands or options.

I've never attempted to use MGET with a GDG, so I have no idea what will happen. I suspect, though, that your first file will be retrieved and written to the GDG as the +1 generation. The next file will be retrieved and FTP will attempt to write it to the GDG as the +1 generation -- at which time an error will occur or the previously transferred file with be overwritten with the "new" +1 generation (I'm not sure which will occur).
Robert Sample
Global moderator
 
Posts: 3507
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 248 times


Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post