Web Hosting, Design, & Coding forum

General discussion

Script to process ascii data

by raffialexanian / September 17, 2009 7:50 AM PDT

Hello all;
Ofcourse am fairly new to VB but not new to programming and scripting. After some initial research, I found VB to be the easiest and best tool to process ascii data. I have a bunch of them (about 15), each is constructed differently, and I will receive monthly updates. the data is all the US flight navigation systems, like VORs, airports...etc. Some of the files have comments and explanations on top and bottom only, and the rest is heading and data at specific columns. Others are a little trickier, like the data for Jetways, its not continuous data, but it breaks for each jetway to identify it first, then plot the data in rows.
What am ultimately trying to do is create a tabular version of some sort of this data to be used in my GIS database. Some of the fields needs to be combined ofcourse, like the latitude and longitude data is given in separate columns, but they need to be combined. I have pasted below a small sample of two different data files. So whats my question? Just very basic guidance and a conceptual thought, is VB really the best way to go for me? Is there a tutorial or something of sorts that helps me get my feet wet please?
Many thanks in advance for any input.

. THE HORIZONTAL REFERENCE DATUM OF THIS PRODUCT IS NORTH . 79975
. AMERICAN DATUM OF 1983 (NAD83), WHICH FOR CHARTING PURPOSES . 82959
. IS CONSIDERED EQUIVALENT TO THE WORLD GEODETIC SYSTEM 1984 (WGS 84). 97800
. . 1230
......................................................................... 44895
0
END OF USER LABEL 20542
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& 56007
N1B R N 43 55 50.0 W 060 01 22.0 SABLE ISLAND F 0277. 9999 -99999 +20 004 CN 88037
N1F R N 47 37 50.0 W 065 44 41.0 BATHURST F 0363. 9999 -99999 +20 004 CN 83264
N1U R N 54 01 54.0 W 132 07 38.0 MASSET A 0278. 9999 -99999 -22 004 CN 78646
N2J R N 49 01 03.0 W 118 25 25.0 GRAND FORKS A 0250. 9999 -99999 -18 004 CN 87198
N2M R N 52 36 11.0 W 090 22 28.0 OPAPIMISKAN LAKE 0393. 9999 -99999 +03 004 CN 96002
N2Q R N 46 36 09.0 W 075 28 14.0 MONT-LAURIER E 0373. 9999 -99999 +15 004 CN 91963
N2T R N 47 42 54.0 W 064 53 09.0 POKEMOUCHE F 0329. 9999 -99999 +20 004 CN 87153
N2U R N 55 18 18.0 W 123 08 15.0 MACKENZIE A 0284. 9999 -99999 -22 004 CN 84113
N3B R N 44 42 05.0 W 075 42 00.0 BROCKVILLE E 0391. 9999 -99999 +14 004 CN 86643
N3U R N 45 31 08.5 W 075 33 51.3 GATINEAU E 0414. 9999 -99999 +14 004 CN 81920
N4D R N 59 25 17.0 W 120 47 22.0 HELMUT B 0364. 9999 -99999 -24 004 CN 78647
N4L RD N 42 18 43.5 W 082 04 40.0 CHATHAM D 0108.6 023X +00674 +08 004 CN 79251


UNITED STATES GOVERNMENT FLIGHT INFORMATION PUBLICATION 149343
0
DIGITAL AERONAUTICAL CHART SUPPLEMENT 100162
0
ALASKA HIGH ALTITUDE AIRWAYS 72640
0
IF YOU HAVE ANY QUESTIONS OR COMMENTS 93392
REGARDING THIS PUBLICATION 69450
PLEASE CONTACT THE 45655
NATIONAL AERONAUTICAL CHARTING OFFICE AT: 104011
(301) 713-2832 24038
0
DEVELOPED, PUBLISHED, AND MAINTAINED 90688
BY THE 14654
NATIONAL AERONAUTICAL CHARTING OFFICE (NACO) 111156
AVIATION SYSTEM STANDARDS (AVN) 79645
FEDERAL AVIATION ADMINISTRATION (FAA) 94493
0
0
0
0
0
0
A - AIRWAY FIX ADDED 12820
C - AIRWAY FIX REVISED 16756
0
0
==============================================================================192699
ALASKA HIGH ALTITUDE AIRWAYS - EFFECTIVE 0901Z AUG 27, 2009 TO 0901Z OCT 22, 161305
==============================================================================192699
0
0
ALASKA ATS ROUTE H201 16411
0
FACILITY OR FIX MAG 24550
INTERSECTION IDENT LATITUDE LONGITUDE ARTCC VAR FIX TYPE 142972
OME OME 64 29 06.4 165 15 11.4 ZAN -17 VOR 80173
SLEDD SLEDD 64 06 04.4 166 06 36.0 WAYPOINT 90098
AVUBA AVUBA 63 10 59.0 167 49 46.2 WAYPOINT 90747
ENEGU ENEGU 62 43 01.2 168 39 25.4 WAYPOINT 90709
MUNRI MUNRI 61 54 00.0 170 02 00.0 WAYPOINT 89872
KIVAK KIVAK 60 35 00.0 172 05 00.0 WAYPOINT 89458
NAYLD NAYLD 59 03 08.6 174 12 28.0 WAYPOINT 90598
0
ALASKA ATS ROUTE H222 16484
0
FACILITY OR FIX MAG 24550
INTERSECTION IDENT LATITUDE LONGITUDE ARTCC VAR FIX TYPE 142972
VALDA VALDA 64 23 36.0 171 05 18.0 WAYPOINT 89752
ICEEE ICEEE 64 08 06.9 166 34 40.2 WAYPOINT 89911
SLEDD SLEDD 64 06 04.4 166 06 36.0 WAYPOINT 90098
MCG MCG 62 57 03.7 155 36 41.1 ZAN -19 VORTAC 95429

Discussion is locked
You are posting a reply to: Script to process ascii data
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: Script to process ascii data
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
Re: processing Ascii data
by Kees Bakker / September 18, 2009 2:42 AM PDT

Any language that can read a text file record by record and has basic string handling capabilities (like substrings, searching for a space in a string, concatenating strings) would be fine. VB is one of them. C or Pascal or even COBOL would be others. No need, I think, for a strict object oriented language, although C++, C# and Java surely would work also.
Just pick what you like.

If ALL records of a file have the same sequence of fields and a clear field separator (like a space), it's easier to use an import in a spreadsheet. That will make nice columns, fully automatically.

But for more or less unstructured files you need some programming indeed.

Kees

Collapse -
Thanks
by raffialexanian / September 18, 2009 3:15 AM PDT

Many thanks for your insightful reply, I will take it on in VB.

Popular Forums
icon
Computer Newbies 10,686 discussions
icon
Computer Help 54,365 discussions
icon
Laptops 21,181 discussions
icon
Networking & Wireless 16,313 discussions
icon
Phones 17,137 discussions
icon
Security 31,287 discussions
icon
TVs & Home Theaters 22,101 discussions
icon
Windows 7 8,164 discussions
icon
Windows 10 2,657 discussions

The Samsung RF23M8090SG

One of the best French door fridges we've tested

A good-looking fridge with useful features like an auto-filling water pitcher and a temperature-adjustable "FlexZone" drawer. It was a near-flawless performer in our cooling tests.