macros to extract data from 3 txt files into a csv

J

Jaycee

I have 3 txt files that contain data and i want to generate a single
spreadsheet.

1 Text file contains the data as below:
USER = GARYG
PU
SU
CL
CR
CG

2. Text file contains data as :
GEN WINDOW_LIST GARYGWL
EXCEPTION = N
,INSTALLATION_DATA = NONE
=MA
, CAN
, MULTI
, WA
, SDR
, ETEL
;

3. Text file contains data as:
USERCODE "GARYG"
DEFAULT_WINDOW = NONE
,WINDOW_LIST = GARYGWL
;

The report i am looking should be like this:
USER PRIV WINDOW_LIST
APPROVED ACCESS

GARYG PU GARYGWL
MA

SU CAN

CL MULTI

CR WA

CG SDR

ETEL

How can i do this?

Appreciate the help. Thanks JC
 
K

KARL DEWEY

What is the logic of text file string position in relation to which field to
place the data. Your example does not seem to follow any pattern.
 
J

Jaycee

What is the logic of text file string position in relation to which fieldto
place the data.   Your example does not seem to follow any pattern.

Karl,
Below is the output format: (what i am trying to achieve)

User Priveleges Application Access
GARYG PU CAN
SU MULTI
MU EXP

The 1st Textfile does not a delimeter character so may be i will have
to edit it to put one. while the other's have semicolon for the end of
record.
The 1st textfile USER=<> has to be validated with the 2nd file string
"USERCODE" and then matched to the 3rd file to find string value
"WINDOW_LIST="
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top