How to copy only certain columns? (AREV Specific)
At 04 MAY 2001 05:10:23PM Sadhana Shavdia wrote:
I have EMPLOYEES file with about 200 fields, from which I want to copy only SSN, Lastname, Firstname to a new file. I created TEMP_EES file and it's DICT. How can I copy only 3 columns from EMPLOYEES to TEMP_EES?
Using AREV 2.13
Thanks.
At 04 MAY 2001 06:29PM [email protected] wrote:
Sadhana,
You could write a simple program, but I'm assuming that that is not what you want to do otherwise you would have done it.
Just off the top of my head, you could Export the data from the file with 200 fields into a text file and then Import the data from the text file into your new tempory file.
To access these functions (Export and Import) under Arev 2.03 (I don't think there is a version 2.13), go to TCL - F5 - and type Runmenu.
Go to Tools and you will see Import and Export. If you hit F1 on any prompt or do a Ctrl-F2 at the window, you will get some helpful hint on how to use it.
Hope this works for you?
Ray Chan
[email protected] onmouseover=window.status=imagine … ;return(true)"
Ray Chan ~ Symmetry Info
At 04 MAY 2001 06:43PM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Assuming that you want to keep the same keys on both files, that SSN is field 1, Lastname is field 2 and Firstname is field 3 in EMPLOYEES and in TEMP_ EES SSN is field 7 Lastname is field 8 and Firstname is field 9, (for instance), you would use an RBASIC routine similar to this one -
SUBROUTINE LOAD_EMPS OPEN 'EMPLOYEES' TO EMP.FILE ELSE RETURN OPEN 'TEMP_EES' TO TEMP.FILE ELSE RETURN END.OF.FILE=FALSE' SELECT EMP.FILE LOOP READNEXT EMP.ID ELSE END.OF.FILE=TRUE" WHILE END.OF.FILE=FALSE' READ EMP.REC FROM EMP.FILE, EMP.ID THEN EES.REC=' EES.REC=EMP.REC EES.REC=EMP.REC EES.REC=EMP.REC WRITE EES.REC TO TEMP.FILE, EMP.ID END REPEATWorld Leaders in all things RevSoft
At 07 MAY 2001 12:09PM Sadhana Shavdia wrote:
Thanks, Sprezzatura Group and Ray Chan. Yes, I was wondering if there is any TCL level command/utility. However both the solutions work. Thanks!