Author |
Message
|
Glass |
Posted: Tue Sep 01, 2009 8:26 am Post subject: FTP a fixed line-size file to mainframe |
|
|
Acolyte
Joined: 02 Mar 2006 Posts: 56
|
Hi,
I am using Broker v6.1.0.4 and I need to ftp a fixed length file to mainframe (for example, each line in the file should be 100 characters). The directory where I am ftp’ing in mainframe is empty and this needs to be a new file in mainframe (they will not create a ‘shell’ for the file specifying the required size – that’s one of the requirement). When I use the ftp option in the FileOutput node, it creates the file in mainframe but defaults to 256 characters. I have tried all the options under the “Record Definition” property.
So if I want only 100 characters per line, it creates a file in mainframe with 100 characters (that I ftp’ed) but fills the rest of the 156 characters with spaces (Hex 40), making the line 256 characters.
Similarly, if I send a 300 character per line file to mainframe, it creates a file with 256 lines and truncates the rest.
So it looks like when broker creates a file in mainframe, it defaults to 256. Is there a way to overwrite this in broker so that broker can dictate the character size per line in mainframe?
I am not too familiar with mainframe so any help will be appreciated.
Cheers! |
|
Back to top |
|
 |
zpat |
Posted: Tue Sep 01, 2009 12:21 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
What sort of mainframe (z/OS I assume) "file"?
1. Standard z/OS dataset - there is no such thing as a mainframe directory.
2. HFS/ZFS -unix like file system - behaves exactly like Unix so no mainframe considerations. |
|
Back to top |
|
 |
Glass |
Posted: Tue Sep 01, 2009 12:28 pm Post subject: |
|
|
Acolyte
Joined: 02 Mar 2006 Posts: 56
|
Zpat,
Thanks for the reply.
It is z/OS. I said "directory" but there may not be a directory. Sorry for the confusion. This just shows my knowledge regarding mainframe.
It is a flat file.
Cheers! |
|
Back to top |
|
 |
zpat |
Posted: Tue Sep 01, 2009 12:53 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Preallocate the mainframe sequential dataset as follows
DSORG=PS,LRECL=100,BLKSIZE=6000,RECFM=FB
If you don't know what this means, then you will have to find someone at your site who does.
A z/OS systems programmer would be the ideal person. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Sep 01, 2009 1:06 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You can not specify the SITE commands that would be needed in normal FTP to specify the blocksize of the file on the mainframe. You therefore either need to pre-allocate it at the correct LRECL, or use a mainframe job to reblock the file.
You should really ensure that your message definition matches the proper block size of the file as defined by the copybook that describes the file and the converse (that the copybook and the LRECL match the message set) . Then your message definition will cover the entire LRECL space no matter what the contents of that space are. The receiving application should therefore be able to handle any padding that occurs. |
|
Back to top |
|
 |
Glass |
Posted: Wed Sep 02, 2009 11:20 am Post subject: |
|
|
Acolyte
Joined: 02 Mar 2006 Posts: 56
|
Thanks to all that replied |
|
Back to top |
|
 |
narki |
Posted: Thu Mar 10, 2011 3:45 am Post subject: |
|
|
Acolyte
Joined: 19 Dec 2005 Posts: 67
|
I need to FTP to ZOS from mainframe using FTPOutput node using . Currently a scipt is used for sending file it has follwoing site command
site lrec=81
site blksize=27945
site recfm=FB
site bl
site unit=
site pri=27
site sec=1
site cond=delete
I am not sure how to execute these site commd using FTP node. In pas I have used FTP node to send emssage to mainframe but I have there was no site command. Also is it advisable to use the FTP node to send 10-20 GB data to main frame. Any help in this regard is higly appriciated. |
|
Back to top |
|
 |
zpat |
Posted: Thu Mar 10, 2011 4:07 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
The FTP node only has a subset of function, I would like to see the APPEND option for example.
WMQ FTE would be a better solution for large volumes.
Are you really going to send 10+GB to a single dataset?
As always - test this with a manual FTP before trying to use WMB. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Mar 10, 2011 4:08 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
There is no FTP node.
There is a FileInput node and a FileOutput node.
Neither of these nodes support any site commands at all for FTP. |
|
Back to top |
|
 |
narki |
Posted: Thu Mar 10, 2011 4:17 am Post subject: |
|
|
Acolyte
Joined: 19 Dec 2005 Posts: 67
|
mqjeff,
I am just trying to understand how to set these LREC BLKSIZE may be there some other way of doing this. Well file can be 5-7 GB size. |
|
Back to top |
|
 |
narki |
Posted: Thu Mar 10, 2011 4:41 am Post subject: |
|
|
Acolyte
Joined: 19 Dec 2005 Posts: 67
|
Also you r right its FILEOUTPut node |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Mar 10, 2011 6:15 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
narki wrote: |
mqjeff,
I am just trying to understand how to set these LREC BLKSIZE may be there some other way of doing this. Well file can be 5-7 GB size. |
Yes.
You must use some other way. You can't do this with FileOutput node.
There are *many* other ways to do this. I'm sure you're smart enough to think of a few. |
|
Back to top |
|
 |
|