copy data from one file to another (in Code) 
Author Message
 copy data from one file to another (in Code)

Could anyone tell me how to copy a clarion data file from one file to
another ?
I need to know the code.....
file 1 = Names
file 2 = NoAddress
----file 2 is identical to file ones File Structure......

I want to Copy Only files with a street address from file one to file 2
and leave the Street Address Blank in File 2......

Any Help Appreciated (As Always)
Thanks



Mon, 03 Dec 2001 03:00:00 GMT  
 copy data from one file to another (in Code)
If file1 is old:list
and file2 is new:list

new:record = old:record
new:StreetAddress = ''
Add(new:list)

Roger

Quote:

> Could anyone tell me how to copy a clarion data file from one file to
> another ?
> I need to know the code.....
> file 1 = Names
> file 2 = NoAddress
> ----file 2 is identical to file ones File Structure......

> I want to Copy Only files with a street address from file one to file 2
> and leave the Street Address Blank in File 2......

> Any Help Appreciated (As Always)
> Thanks



Mon, 03 Dec 2001 03:00:00 GMT  
 copy data from one file to another (in Code)
If the keys don't match

new:record :=:  old:record
new:StreetAddress = ''
Add(new:list)

Roger Bishop



Quote:
>Could anyone tell me how to copy a clarion data file from one file to
>another ?
>I need to know the code.....
>file 1 = Names
>file 2 = NoAddress
>----file 2 is identical to file ones File Structure......

>I want to Copy Only files with a street address from file one to file 2
>and leave the Street Address Blank in File 2......

>Any Help Appreciated (As Always)
>Thanks



Mon, 03 Dec 2001 03:00:00 GMT  
 copy data from one file to another (in Code)
P.S.
I need to know the code to open both files and then closing them in source
and run the source from a button......

Quote:
> Could anyone tell me how to copy a clarion data file from one file to
> another ?
> I need to know the code.....
> file 1 = Names
> file 2 = NoAddress
> ----file 2 is identical to file ones File Structure......

> I want to Copy Only files with a street address from file one to file 2
> and leave the Street Address Blank in File 2......

> Any Help Appreciated (As Always)
> Thanks



Mon, 03 Dec 2001 03:00:00 GMT  
 copy data from one file to another (in Code)
Thanks, I forgot that one!

Roger G.

Quote:

> If the keys don't match

> new:record :=:  old:record
> new:StreetAddress = ''
> Add(new:list)

> Roger Bishop



> >Could anyone tell me how to copy a clarion data file from one file to
> >another ?
> >I need to know the code.....
> >file 1 = Names
> >file 2 = NoAddress
> >----file 2 is identical to file ones File Structure......

> >I want to Copy Only files with a street address from file one to file 2
> >and leave the Street Address Blank in File 2......

> >Any Help Appreciated (As Always)
> >Thanks



Mon, 03 Dec 2001 03:00:00 GMT  
 copy data from one file to another (in Code)


Quote:
> I need to know the code.....

Depends on ABC or Clarion template.  Also if the files have keys with
unique attribute, avoiding creating duplicates and/or autonumbering is
always a concern.  Also how will you handle the case where there is
some one with the same name already in file 2.  The ABC insert method
will auto number for you automatically but if your using clarion
templates you get to write your own code.  
---
Jim Kane  - TeamTopSpeed
Productive Software Solutions
Can't Find that Message?
Get Organized, Get ForKeeps!
www.fkeeps.com


Mon, 03 Dec 2001 03:00:00 GMT  
 copy data from one file to another (in Code)
I am using Cw2003 and I want to loop file 1 and then if the record has no
street Then copy that file to file 2. something like open(file1)
set(file1)loop(file1) if fil:street='' then Put(file2) etc...I want to put a
button on a browse to open both files and loop file1 and copy to file2 in a
source procedure...
I do not know how to open 2 files and loop 1 and copy to another in code....
Thanks for any help....


Quote:


> > I need to know the code.....

> Depends on ABC or Clarion template.  Also if the files have keys with
> unique attribute, avoiding creating duplicates and/or autonumbering is
> always a concern.  Also how will you handle the case where there is
> some one with the same name already in file 2.  The ABC insert method
> will auto number for you automatically but if your using clarion
> templates you get to write your own code.
> ---
> Jim Kane  - TeamTopSpeed
> Productive Software Solutions
> Can't Find that Message?
> Get Organized, Get ForKeeps!
> www.fkeeps.com



Mon, 03 Dec 2001 03:00:00 GMT  
 copy data from one file to another (in Code)
Hi Burt,

Quote:
>I need to know the code.....
>file 1 = Names
>file 2 = NoAddress
>----file 2 is identical to file ones File Structure......

>I want to Copy Only files with a street address from file one to file 2
>and leave the Street Address Blank in File 2......

SET(Names)
LOOP
  NEXT(Names)
  IF ErrorCode() THEN BREAK .
  IF FIL1:StreetAddress = '' THEN CYCLE .    !we want only filled
  FIL2:Record = FIL1:Record
  FIL2:StreetAddress = ''
  ADD(NoAddress)
  IF ErrorCode()
    STOP(ErrorCode() & ': ' & Error())
  END
END

HTH
Maarten



Mon, 03 Dec 2001 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. I have 100 data files, I want to join them together as one data file

2. How to replace one or two words with one word with one line of awk code

3. Copy a file from one location to another

4. copy file from one directory to another directory

5. Copy a files from one directory to another...

6. help reading negative values in data file - test code and test data

7. Copy fields and DATA of Another File?????

8. How to Copy fields and DATA of Another File

9. How to copy data between 2 dates in new file

10. Copy a Data-file in cobol

11. Copying File Data

12. another python style question -- copying a data file

 

 
Powered by phpBB® Forum Software