Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

DOS FTP - Mainframe (Data was Truncated)

Posted on 2014-04-14
11
Medium Priority
?
1,531 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
11 Comments
 
LVL 57

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 57

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
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 57

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
 
LVL 57

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 300 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 57

Accepted Solution

by:
Bill Prew earned 1200 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 57

Expert Comment

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

~bp
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

688 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