Page 1 of 2

ftp: send variable length binary (VB) file to mainframe

PostPosted: Fri Mar 21, 2008 10:43 pm
by bakinsoda
Hi,

I would like to send a variable length binary file to the mainframe from a unix and/or linux system. The case is as follows. I send a file from the mainframe to the unix using BINARY and SITE RDW. The file is on the unix. Now, I want to send it back to the mainframe.

I used options such as BINARY, SITE RDW RECFM=VB LRECL=121.

Because we are sending as binary, the RDW is recognized as data and gets stored. Also, every line is being filled up to 121 and there is no variable length except maybe the last line.

How do i let the mainframe or ftp know when is the end of a line so it can save properly?

I've googled for weeks and haven't found a solution yet. The only thing i found was maybe to pad the file down with spaces to make it fixed length, and then post-process it on the mainframe. however, i don't know how to do this either.

Help?

I can append a (fake) BDW to the file if necessary. Also, I would prefer any manipulations on the unix side as i don't know mainframe as well.

Re: ftp: send variable length binary (VB) file to mainframe

PostPosted: Sat Mar 22, 2008 12:50 am
by dick scherrer
Hello bakinsoda and welcome to the forums,

What kind of binary data do you have that is being used on both the mainframe and a unix system? Usually this will either not work or is very complicated (unless proprietary software is being used).

If the file originates on the mainframe, i'd suggest you re-create the file on the mainframe (or have it re-created) so that there are no binary numbers.

Variable/blocked records are also not handled well on the unix system (unless there is other special code in place). Block descriptor words and record descriptor words are not normal in unix.

I've googled for weeks and haven't found a solution yet.
I'm not surprised :)

Re: ftp: send variable length binary (VB) file to mainframe

PostPosted: Sat Mar 22, 2008 1:29 am
by bakinsoda
Thanks for the response.

The data is meant to be read using SAS (hence the binary stuff). We moved our SAS stuff over to unix from the mainframe. However, sometimes, we need to send data back to the mainframe for other groups.

We already figured out how to handle variable block (rdw and bdw) files on the unix. The only thing i want to know how to do now is to transfer a VB file back to the mainframe. I know there are proprietary software that does this, but im just convinced that it is possible to do this (through ftp or scripting in perl or python).

Any other suggestions? I meant to post this in the other forum, but i never got my approval.

Re: ftp: send variable length binary (VB) file to mainframe

PostPosted: Sat Mar 22, 2008 1:44 am
by dick scherrer
Hello,

I've never had a vb file on a unix or win-based system, so i've never tried to "send one back" to the mainframe.

but im just convinced that it is possible to do this (through ftp or scripting in perl or python).
I suspect that even with perl or some other scripting, you would still use ftp for the transfer. Does your environment use Connect Direct (sometimes known as NDM).

I meant to post this in the other forum, but i never got my approval.
When did you "sign up"? Have you "talked" with anyone about the delay? And to be safe - which "other forum"? I may be able to get something going there.

Re: ftp: send variable length binary (VB) file to mainframe

PostPosted: Sat Mar 22, 2008 2:26 am
by bakinsoda
Other forum is IBMMainframes.com

Re: ftp: send variable length binary (VB) file to mainframe

PostPosted: Sat Mar 22, 2008 2:36 am
by dick scherrer
Hello,

IBMMainframes.com
Yup, i'm a moderator there as well.

Did you use the same id as here or did you use something else? If not, what id did you want to use there?

What (if any) responses/replies did you recieve when you attempted to register?

Re: ftp: send variable length binary (VB) file to mainframe

PostPosted: Sat Mar 22, 2008 4:45 am
by bakinsoda
the username they sent me in the email was Username: vinh nguyen

Your account is currently 'INACTIVE', the administrator of the board will need to activate it before you can log in. You will receive another email when this has occurred.

email was received on wednesday.

i would like to post the same question there. in the mean time, i wouldnt mind u posting my question there for me. thx. im still convinced there has to be a way through ftp without using proprietary software

Re: ftp: send variable length binary (VB) file to mainframe

PostPosted: Sat Mar 22, 2008 5:43 am
by dick scherrer
Hello,

This is on the "other" forum: Viewing profile :: vinh nguyen

Are you in California? Possibly a statistician?

ibmmanframes says this id joined on 19 MAR. Sounds like the follow-up e-mail didn't happen.

You might try to sign on and let me know if you are successful or if there is still work to be done.

Good luck :)

Re: ftp: send variable length binary (VB) file to mainframe

PostPosted: Sat Mar 22, 2008 11:30 am
by bakinsoda
i tried logging in using vinh nguyen and my pw, but didnt work.

Re: ftp: send variable length binary (VB) file to mainframe

PostPosted: Thu Oct 02, 2008 10:06 am
by Rani Arulsothy
If you can use connect direct, you can transfer a binary file from UNIX to maninframe by entering (don't include the quotes) ":DATATYPE=BINARY:" in the SYSOPTS field in the connect direct screen panel.

I am assuming the file you are attempting is transfer is a CPORT file from your SAS session in UNIX.


If using FTP, to ensure that the transfer type is set to Binary, type “bin” to achieve this
:)