views:

185

answers:

2

Hello, I am uploading file to mainframe and before uploading when I open it using notepad I am able to view it.

Once uploaded the administrator is complaining that he is not able to read the data in file and it appears as junk.

Is there anything else I need to do before uploading files to mainframes. I am using Chilkat component to upload the files to mainframes.

Any help greatly appreciated.

Thanks

+1  A: 

This sounds like an encoding issue. For example, you file maybe in ASCII and your mainframe is expecting something else. Hence, junk would be displayed on the other end.

ichiban
+1  A: 

It definitely sounds like an encoding issue. I had some files transferred from a mainframe earlier this morning that because I forgot to switch to ASCII were all rubbish.

Try switching to ASCII and transferring it, if you are using ASCII, switch to binary.

You also might check with the mainframe admin and ask him if there are any site commands you need to execute prior to sending so you set the record size and block type.

thismat
If they have to be readable (or runnable) on the host, this is a good idea. But if you're just storing them there (e.g., as backup or in SCLM source control), leave them as they are. Modern versions of the ISPF editor have the command "source ascii" and "lf" which will allow you to view ASCII files properly.
paxdiablo
Interesting! I'm going to try this tomrorow!One question, does it take up more space leaving them as a 256 VB file or would it be ideal if you're storing a lot of files to set them to fixed block and set the length when sending down? (I figure this is good information to leave on the question).
thismat
@thismat, I think if you upload them in binary, it doesn't try to fiddle around with line endings and padding of records. It just blats them up as is (and you'll have newline characters in the middle of your records). It's the LF command itself that modifies the data so that it separates lines and adds padding. Word of warning, make sure you're in view rather than edit since I can't remember whether IBM fixed the problem with having the LF'ed data rewritten to the dataset (not nice). Also I think you need to be in the ISPF *editor*, not browse mode - I just use view rather than browse myself.
paxdiablo