Topic: Virtual spaces' in records (1 of 8), Read 49 times
Conf: VEDIT Suggestions
From: Mark Chalkley
Date: Saturday, February 21, 2004 11:13 AM

A lot of my file editing/viewing involves fixed-length records with many different fields in them, but there's no separator between them. It would take a lot of the eyestrain and mistakes out of the process if you could "insert" spaces in columns visually, even though they really don't exist. For example, if I'm looking at a fixed record length file with two numeric fields in each record, the first in columns 1-5, the second in columns 6-10. If you could specify that a space appear between columns 5 and 6, it would be a lot easier to read the numbers. Obviously this is so simple an example, that it wouldn't really be necessary, but with 30 or 40 fields in a record, it gets to be a real pain. Of course, the inserted spaces would have to be "virtual" spaces, and not really be inserted into the file...

 


Topic: Re: Virtual spaces' in records (2 of 8), Read 48 times
Conf: VEDIT Suggestions
From: Ted Green
Date: Saturday, February 21, 2004 12:44 PM

At 11:14 AM 2/21/2004, you wrote:
>A lot of my file editing/viewing involves fixed-length records with many different fields in them, but there's no separator between them. It would take a lot of the eyestrain and mistakes out of the process if you could "insert" spaces in columns visually, even though they really don't exist...

Our plans for "automatic" tab stops would solve this too.

Ted.

 


Topic: Re: Virtual spaces' in records (3 of 8), Read 49 times
Conf: VEDIT Suggestions
From: Mark Chalkley
Date: Saturday, February 21, 2004 12:49 PM

That would be wonderful, but I don't see how it could. Suppose I have the following data file record:

13339431938ABCDE39439109349483393841087838798

I can see how a macro might be able to figure out that the alphabetic string is a separate field (but that might be incorrect), but how could it determine that field A is col 1-3, field B is col 4-9, etc.?

Mark

 


Topic: Re: Virtual spaces' in records (4 of 8), Read 53 times
Conf: VEDIT Suggestions
From: Ted Green
Date: Saturday, February 21, 2004 03:02 PM

At 12:49 PM 2/21/2004, you wrote:
>That would be wonderful, but I don't see how it could. Suppose I have the following data file record:
>
>13339431938ABCDE39439109349483393841087838798

You are correct, that cannot be done. However, many files have delimited
fields.

Ted.

 


Topic: Re: Virtual spaces' in records (5 of 8), Read 51 times
Conf: VEDIT Suggestions
From: Mark Chalkley
Date: Saturday, February 21, 2004 06:18 PM

So, what would you suggest, in this case? I suppose I could write a Perl script that would insert a tab between each of the fields, then use the tab macro that Christian just uploaded to display it. Is there an easier way?

 


Topic: Re: Virtual spaces' in records (6 of 8), Read 52 times
Conf: VEDIT Suggestions
From: Christian Ziemski
Date: Sunday, February 22, 2004 02:26 AM

>So, what would you suggest, in this case?
>I suppose I could write a Perl script that would
>insert a tab between each of the fields, then use the tab
>macro that Christian just uploaded to display it. Is
>there an easier way?

I can think of a modified TABUMAT macro which inserts the TABs dependent on the mentioned ruler line by itself (using Block_Fill()) and then sets the tab stops.

But now I'm hungry, breakfast is calling. ;-)

Christian

 


Topic: Re: Virtual spaces' in records (7 of 8), Read 50 times, 1 File Attachment
Conf: VEDIT Suggestions
From: Christian Ziemski
Date: Sunday, February 22, 2004 06:00 AM


Here is a little macro for helping with fixed-length data.

But the inserted colums are not virtual as you wished in your original
posting, they are real...
(So you have to delete them afterwards. That can be done with a
similar macro.)


Example:

a) the fixed length data (line# only shown for better description):

1 123412123abcdef
2 234556987uvwxyz
3 ...
...

b) insert a ruler line (e.g. as new line 1) marking the field limits:

1 x x x
2 123412123abcdef
3 234556987uvwxyz
4 ...
...

c) position the cursor in that ruler line
d) execute the macro

e) the result: (the "_" stands for the configurable inserted char.)

1 _x _x _x
2 1234_12_123_abcdef
3 2345_56_987_uvwxyz
4 ...


Christian

 
FIX-INS1.VDM (2KB)

 


Topic: Re: Virtual spaces' in records (8 of 8), Read 52 times
Conf: VEDIT Suggestions
From: Mark Chalkley
Date: Sunday, February 22, 2004 08:07 AM

That works extremely well, Christian - thanks!!! Actually, since almost none of these files contain tabs, I can just delete all the tabs in the entire file when I'm done. For that matter, most of the time, I'd only insert the tabs in a working copy of the file and never even save it back to disk...

Thanks again, very much!

Mark Chalkley