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

FTP XML huge files to mainframe


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vishwanath001

New User


Joined: 06 Jun 2016
Posts: 2
Location: India

PostPosted: Mon Jun 06, 2016 8:21 pm
Reply with quote

We are trying to FTP XML files to Mainframe server.The file size varies up to 15 GB

We are trying to use the below command

SITEENTRIES="UNIT=TAPE READTAPEFORMAT=V LRECL=32000 DATACLAS=EDC000EC LOCSITE PRI=128000 SEC=128000 CYLINDERS"

but the ftp fails with following error

451-File transfer failed. File contains records that are longer than the LRECL of the new file.
451 Transfer aborted due to file error. File is deleted.
421 Service not available, remote server has closed connection

Please help/guide to do ftp XML files to mainframe that can range up to 15 GB

code used :

ftp -D 3600 -v -n -i <server name>
user user id pwd
ascii
site "UNIT=TAPE READTAPEFORMAT=V LRECL=32756 DATACLAS=EDC000EC LOCSITE PRI=32760 SEC=32760 CYLINDERS"
put src file 'tgt file'

If there are any changes in code required or any other solution, please let us know

Please note this process is done for XML archival, we also need to retrieve archived mainframe File is same fashion whenever required
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Jun 06, 2016 10:08 pm
Reply with quote

What are you doing on the source machine to ensure that no record is longer than 32760 bytes? You ABSOLUTELY must put record terminators (CR/LF on Windows or LF on Unix) at intervals of no more than 32760 bytes to split the source file into records on the mainframe. You may have to have a corresponding process to recombine the records into one when retrieving the data from the mainframe. If you are going to disk, putting record terminators every 27996 or 27997 bytes (for Windows or Unix) would maximize disk space efficiency.

And what you posted doesn't really make sense -- UNIT=TAPE would not require any cylinders of space; if you use cylinders than TAPE is not an option. And 15 GB is about 19,176 cylinders at half-track blocking (the most efficient).
Back to top
View user's profile Send private message
vishwanath001

New User


Joined: 06 Jun 2016
Posts: 2
Location: India

PostPosted: Mon Jun 06, 2016 11:14 pm
Reply with quote

Thanks Robert for the clear explanation icon_smile.gif

Can you please share the sample code snippet which does the record splitting at the mainframe end and also which uses the cylinders with maximum efficiency as i 'm a novice to mainframe FTP'ing process


I appreciate your support on this

icon_rolleyes.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Jun 06, 2016 11:42 pm
Reply with quote

Quote:
Can you please share the sample code snippet which does the record splitting at the mainframe end
I don't think you understand yet -- the data received in z/OS on the mainframe must have records no longer than 32760 bytes; you CANNOT convert it on the mainframe. I don't recall what the limit is for a Unix System Services file, but I suspect 15 GB might be over the limit. I don't know if your source machine is Unix or Windows, but you (or somebody) will have to write a program in the language of your choice to split the file into records BEFORE it is transferred to z/OS.

For a tape, 32760 bytes is most efficient as that's the longest block size you can use (barring special circumstances). For disk, half-track blocking is typically most efficient which is 27998 bytes.
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Mainframe openings in Techmahnidra fo... Mainframe Jobs 0
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top