Solved

DOS FTP - Mainframe (Data was Truncated)

Posted on 2014-04-14
11
1,369 Views
Last Modified: 2014-04-16
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
Comment
Question by:smithmrk
  • 6
  • 4
11 Comments
 
LVL 51

Expert Comment

by:Bill Prew
ID: 40000545
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
 
LVL 51

Expert Comment

by:Bill Prew
ID: 40000547
Of course, I should add, can you change the source of this "odd" file to include line break characters?

~bp
0
 

Author Comment

by:smithmrk
ID: 40002173
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
 
LVL 51

Expert Comment

by:Bill Prew
ID: 40002407
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
 

Author Comment

by:smithmrk
ID: 40002554
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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 51

Expert Comment

by:Bill Prew
ID: 40002832
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
 
LVL 14

Assisted Solution

by:ThomasMcA2
ThomasMcA2 earned 100 total points
ID: 40003072
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
 

Author Comment

by:smithmrk
ID: 40004186
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
 
LVL 51

Accepted Solution

by:
Bill Prew earned 400 total points
ID: 40004273
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
 

Author Closing Comment

by:smithmrk
ID: 40004287
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
 
LVL 51

Expert Comment

by:Bill Prew
ID: 40004300
Welcome, and good luck!

~bp
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Using dates in 'DOS' batch files has always been tricky as it has no built in ways of extracting date information.  There are many tricks using string manipulation to pull out parts of the %date% variable or output of the date /t command but these r…
One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now