exists update

Dennis Malen dmalen at malen.com
Mon Dec 6 17:34:38 PST 2004


Ken,

if: fg="no"
then: gosub firstL

then it is suppose to go to a gosub and write the following header to an
export file:

fisrtL

if: mk="m"               'first line
then: rnt(1)="REF_NUM";rnt(2)="LAST_NAME";rnt(3)="FIRST_NAME"
  -   -   -   -   -   -   -   -   -   -   -   -   -   -
if: mk="m"
then: rnt(4)="MIDDLE_NAME";rnt(5)="FULL_NAME";rnt(6)="SSN"
  -   -   -   -   -   -   -   -   -   -   -   -   -   -
if: mk="m"                'flag
then: fg="yes";write rnt;return

This is a one time pass. It is setting up the first line of an excel file.
As long as the file is in existence then the program should not come here
again. My problem is to get the processing to come here once. The rest of
the file is created properly except for this first title line.

The full processing looks like this before it goes to the gosub:

~ If: exists("/tmp/rnx/banco.wp")="0"      'xe="0"
Then: fg="no"        'file not exist - create header
-----   -   -   -   -   -   -   -   -   -   -   -   -
~ If:
Then: export ascii rnt=(pn) r=\n f=\t -a
-----   -   -   -   -   -   -   -   -   -   -
~ If: 6 ne "" and mid(6,"1","4")="0000"
Then: goto banco2
-----   -   -   -   -   -   -   -   -   -   -
~ If: 6 ne "" and 1 co "*"      'name contains *
Then: goto banco2
-----   -   -   -   -   -   -   -   -   -   -
~ If: 6 ne "" and fg="no"     'create header
Then: mk="m";gosub firstL

See firstL above

Dennis Malen

P.S. I will now use "eq" instead of "le", although I do not see how any
would change.

----- Original Message ----- 
From: "Kenneth Brody" <kenbrody at bestweb.net>
To: "Dennis Malen" <dmalen at malen.com>
Cc: <filepro-list at lists.celestial.com>
Sent: Monday, December 06, 2004 7:33 PM
Subject: Re: exists update


> > Dennis Malen wrote:
> >
> > I am now going to use the following and based upon what everyone has
said,
> > then this should work:
> >
> >  If:
> > hen: xe=exists("/tmp/rnx/banco.wp")
> > ----   -   -   -   -   -   -   -   -   -   -   -   -
> >  If: xe="0"
> > then: fg="no"
>
> Why use that, when this is equivalent:
>
>     If: exists("/tmp/rnx/banco.wp") = "0"
>   Then: fg="no"
>
> What "didn't work" with your original version?
>
> -- 
>
+-------------------------+--------------------+----------------------------
-+
> | Kenneth J. Brody        | www.hvcomputer.com |
|
> | kenbrody/at\spamcop.net | www.fptech.com     | #include
<std_disclaimer.h> |
>
+-------------------------+--------------------+----------------------------
-+
> Don't e-mail me at: <mailto:ThisIsASpamTrap at gmail.com>
>
>
>
>




More information about the Filepro-list mailing list