• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1626
  • Last Modified:

DOS FTP - Mainframe (Data was Truncated)

This is a unique request...I have a file that I FTP to a main frame and normally if the the record length of each record in the text file is say for example 85 I would just put:

quote site lrecl = 85

This usually works and my data is NOT Trunacated...however I have a very unique file that one of our clients gets that does NOT have any CRLF in the file...it is one continuous string of data making it impossible to put an lrecl = ??

How can I get around this?

Mark
0
smithmrk
Asked:
smithmrk
  • 6
  • 4
2 Solutions
 
Bill PrewCommented:
Do you know how long the records are supposed to be in the file with no line breaks?  If so then we could write a small program to insert the needed line breaks.

Or, perhaps there is a set of characters that can be used to locate the start of each line?

~bp
0
 
Bill PrewCommented:
Of course, I should add, can you change the source of this "odd" file to include line break characters?

~bp
0
 
smithmrkAuthor Commented:
Nethier are options!
The clients request was to have a file with NO CRLF within the file.

I will agree that it is odd...but I'm stuck with the way it needs to be.
Also each of the records within the file are different lenghts.

For example the header record is 30 and the detail record is 82.
But in the end it wraps all together when viewing in Notepad or any other text editor.

Mark
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
Bill PrewCommented:
Okay, this is more of a mainframe question than a DOS FTP question.  You are dealing with a file type this is strange.  I will expand the visibility of this question to include some IBM mainframe experts, there may be a different RECFM that is needed.

It sounds like the file may be too large to upload in entirety, but on a PC< could you download the HEXDUMP utility from this site http://www.richpasco.org/utilities/hexdump.html , extract the EXE into a folder with a sample data file (unedited), and then do the following command:

hexdump.exe /keep:500 inputfile.txt > outputfile.txt

and then post the outputfile.txt here?  That might also give some clues on how to deal with this file.

~bp
0
 
smithmrkAuthor Commented:
I appreciate your help!

The file is small 16KB...the problem is that it is one continuous string of data with NO CRLF.
This appears to throw off the mainframe when I have no way of telling it what the Record Length is as it changes from day to day.

Mark
0
 
Bill PrewCommented:
Is it possible for you to post a sample, or the dump I mentioned?  It is possible that there could be "special characters" that notepad ignores but could be important to finding a solution.

~bp
0
 
ThomasMcA2Commented:
Perhaps the file is in the Unix/Linux format that only uses LF instead of CRLF. To DOS/Windows, that single LF is ignored, making it look like a continuous string.

Try opening the file in Notepad++. It can do Search and Replace on LF characters. It also has a "file type" menu option for the Unix/Linux file format.

If the file does have LF characters, a search and replace tool could create a new file that replaces them with CRLF characters.

Edit: I see now that the client doesn't want CRLF characters. I'll leave my possible answer anyway, since there is a chance it might help.
0
 
smithmrkAuthor Commented:
I appreciate everyones help on this!

First I'm not able to send a copy of the data due to security reasons (it has sensitive data)...but I can tell you that I created the file!

The client's requirements were to produce the file without the CRLF.
The file is in ASCII Format and I use UltraEdit program to open the file and it is one continuous string of data...trust me on this!

I need a way to FTP the file to the Main Frame without it truncating this file.

FYI...it has been this way for many years and we use to send it (FTP) to a server then the Main Frame would pick the file up from there...but now the requirment is to decommission this server and send the file directly to the Main Frame...which is why we are now getting this error.

Thanks,
Mark
0
 
Bill PrewCommented:
Since you are trying to transfer a file in non standard Windows format (ascii, no end of line characters) and need to transfer in text mode so the ascii to ebcdic character translation occurs, I think you need to ask the mainframe support staff what format to use in sending the file to them.  It's clearly not a FB format from what I understand, so it may need to be done with a RECFM = U or something, but they should be able to provide that to you, since they need the file to be in the proper format at their end.

Sorry I'm not a lot of help on this, I've been away from mainframes for some number of years and not familiar with all the options on the FTP server program.

~bp
0
 
smithmrkAuthor Commented:
Thanks Guys!
I appreciate all the comments and sugguestion!

I will work it out with the Main Frame guys or they may have to just pick it up themselves from our server without me FTP the file at all.

Thanks,
Mark
0
 
Bill PrewCommented:
Welcome, and good luck!

~bp
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now