Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert Record Format of File

Status
Not open for further replies.

taz75

Programmer
Apr 17, 2001
15
0
0
GB
Not sure if this is possible.
We have received a file that seems to have lost it's end-of-line markers. So that the data looks like this (sort of!):
02iunujgybbgY 02itgujgybbiY 02iuerjgrtrgY

I did a dir/full name.dat and it said that the
Record format: Fixed length 512 byte records

Each line should have exactly 13 characters (all end in "Y" if this helps).

We'd like the data to look like this
02iunujgybbgY
02itgujgybbiY
02iuerjgrtrgY
etc

Any help that anyone could give me would be great,
Thanks,
taz75
 
There is a VMS utility that will convert the file from one format into another. I believe the utility is called convert. Try: help convert
 
If convert doesn't work, a snippet of DCL can fix the problem (easy if your output MUST be 13 characters ending in "Y" - just keep reading characters until you have 13, write it out and repeat!) but I'd need a decent size sample of the data - a couple of dozen lines would probably suffice (or the whole file if it isn't too big) so I can see if it wraps groups round the line.
If you want me to code you up something, drop me a line at the following, with the sample data attached;
hugh<underscore>samson<at>hotmail<dot>com

Hugh
[morning]
 
ANALYZE/FDL filename.ext

will create the FDL for your file, you can then edit the FDL to your desired requirements

CONV/FDL will convert the structure of you file

HTH
--Paul


It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ... smack the fecker
 
Somemore suggestions:

1) set/file
Do "Help set /file" to see an explanation

2) edit/teco filename
*ex<esc><esc> (Teco's prompt is a *, then type "ex" followed by two ESC characters)

The edit filename or edit/tpu filename and remove any CR/LF characters you see.

Ken
 
Give FILE.DAT is your file:

$ set file/attr=(lrl:13) file.dat

might help. (but make a safe copy first, just in case ;-)

There are more attributes you may need to set; take a look at HELP SET FILE/ATTRIB

Willem

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top