How can I read a text file with Quiz under UNIX?
Robert J.M. Edis
robert.edis@creatcomp.com
Mon, 21 Feb 2000 16:11:22 -0500
G'day all
Environment: HP/UX 10.20, PH 7.33.D3
I need to read a data file created in MS Excel. In VI I can 'see' that data
quite nicely and I created a record layout in the dictionary to match what I
see in the editor.
First of all I saved the spreadsheet data as a .PRN file. I then used
TextPad 4.0 to strip the header and footer records so I only had data
records. The editor tells me the last byte is in column 77.
I then used WRQ FTP mode to copy the file to the HP/UX box where I inspected
the contents using both MORE and VI. The transfer looked ok.
I created the record layout as follows:
FILE gemini_adns &
ORGANIZATION SEQUENTIAL &
TYPE UNIXIO &
CREATE &
OPEN "ChartAccts.prn"
RECORD gemini_adns
ITEM old_accountno &
DATATYPE CHARACTER Size 12
ITEM gem_acct_desc &
DATATYPE CHARACTER Size 36
ITEM gem_account &
DATATYPE CHARACTER Size 9
ITEM gem_func_code &
DATATYPE CHARACTER Size 3
ITEM gem_anal_code &
DATATYPE CHARACTER Size 1
ITEM gem_mgnt_code &
DATATYPE CHARACTER Size 3
ITEM gem_prod_line &
DATATYPE CHARACTER Size 7
ITEM gem_loc_code &
DATATYPE CHARACTER Size 6
The problem I have is that QUIZ does not appear to reD the file correctly.
For example, if I do a simple REPORT old_accountno I get:
Old
Account
Number
10105100099
10111000000
0
1013010100
80
101301019
880
when VI shows me the data as:
10105100099
10111000000
10130101000
10130101999
The value '880' is the last 3 bytes of the record in all four cases.
I would realy appreciate any help offered by the PH/UNIX gurus out there.
Regards
Blue
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.