RE: DATA statement Clearing?

2004-04-02 Thread Anthony Youngman
We have programs that make extensive use of data statements. And they
regularly screwed up because people asked us to change the prompt
sequence (adding new requests or whatever...)

So I've been steadily rewriting them all to use arguments on the command
line, retrieving it all from @SENTENCE.

One little tip - I always add the option BATCH, which is set by looking
for the word on the command line as the program starts. My input code
then knows, if this flag is set, that there is no user to ask the
information from. And if I'm asked to add more user input, seeing this
option in other inputs reminds me that I need to add it here, and
provide a default because I'm not allowed to prompt.

Cheers,
Wol

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Karl L Pearson
Sent: 01 April 2004 18:39
To: U2 Users Discussion List
Subject: RE: DATA statement Clearing?

You bring up a good point. Design-time decisions seemed to make sense
that this would be the easiest way to do this project with the greatest
amount of 'after the fact' support freedom, so, reading the data from a
file wasn't considered. However, we just had a discussion and decided it
wouldn't be that tough to make the change over.

CLEARDATA works on uniVerse, too. Thanks. Darn Manuals. Why can't they
just talk to me?

Karl






This transmission is intended for the named recipient only. It may contain private and 
confidential information. If this has come to you in error you must not act on 
anything disclosed in it, nor must you copy it, modify it, disseminate it in any way, 
or show it to anyone. Please e-mail the sender to inform us of the transmission error 
or telephone ECA International immediately and delete the e-mail from your information 
system.

Telephone numbers for ECA International offices are: Sydney +61 (0)2 9911 7799, Hong 
Kong + 852 2121 2388, London +44 (0)20 7351 5000 and New York +1 212 582 2333.



--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: DATA statement Clearing?

2004-04-01 Thread Larry Hiscock
Not sure about UniVerse, but UniData has a CLEARDATA verb.  Rather than
stuffing the data buffer with all this stuff, wouldn't it be just as easy to
open the file from within a program and read/process it?

Larry Hiscock
Western Computer Services


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Karl L Pearson
Sent: Thursday, April 01, 2004 8:41 AM
To: u2-users
Subject: DATA statement Clearing?


I have a program that takes a printed replenishment order (sent via
smoke and mirrors to a text file on our uniVerse server from remote
sites), parses through it and passes DATA to an Order Entry program
(4580 lines long).

I'm curious if there's a way to clear those data statements up as part
of clean-up in case of an error in the data structure at the remote
site. I.E, there are 3 lines of text for each ordered product. On the
first line, is pricing, so I do a findstr for a $-sign, which allows me
to know I'm on the first of 3 lines for one item. With some of our
clients, the inventory item is on the first line and with others it's on
the 2nd or 3rd line.

My code knows the difference by client number and process correctly,
however on some clients, the inventory item number isn't where it's
supposed to be, causing the order entry program to go into cardiac
arrest. My cleanup then has to undo the locking mechanism (prevents more
than one process at a time), plus release locks, etc.

I need to be able to clear the data statements because they are
currently being passed to the menuing system, which causes the operator
to wonder what's going on and hope nothing bad just happened.

INPUTCLEAR and CLEARSELECT don't work (I thought inputclear would...).

Help?


--
Karl L. Pearson
Director of IT,
ATS Industrial Supply
Direct: 801-978-4429
Toll-free: 888-972-3182 x29
Fax: 801-972-3888
http://www.atsindustrial.com
[EMAIL PROTECTED]

--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: DATA statement Clearing?

2004-04-01 Thread Karl L Pearson
The theory is that our database (old version of ACCESS) will get on the
client systems and clean up the data, thus making the different uses of
this step unnecessary. Good old data consistency would be nice.

Karl


On Thu, 2004-04-01 at 10:50, Eugene Perry wrote:
 One thing you could do would be to pass the data a little more information.
 For example, you could pass it something like inventory#=xx etc.  This
 way, your program could know which line it is on no matter which client.
 
 Eugene
 
 - Original Message -
 From: Karl L Pearson [EMAIL PROTECTED]
 To: u2-users [EMAIL PROTECTED]
 Sent: Thursday, April 01, 2004 9:40 AM
 Subject: DATA statement Clearing?
 
 
  I have a program that takes a printed replenishment order (sent via
  smoke and mirrors to a text file on our uniVerse server from remote
  sites), parses through it and passes DATA to an Order Entry program
  (4580 lines long).
 
  I'm curious if there's a way to clear those data statements up as part
  of clean-up in case of an error in the data structure at the remote
  site. I.E, there are 3 lines of text for each ordered product. On the
  first line, is pricing, so I do a findstr for a $-sign, which allows me
  to know I'm on the first of 3 lines for one item. With some of our
  clients, the inventory item is on the first line and with others it's on
  the 2nd or 3rd line.
 
  My code knows the difference by client number and process correctly,
  however on some clients, the inventory item number isn't where it's
  supposed to be, causing the order entry program to go into cardiac
  arrest. My cleanup then has to undo the locking mechanism (prevents more
  than one process at a time), plus release locks, etc.
 
  I need to be able to clear the data statements because they are
  currently being passed to the menuing system, which causes the operator
  to wonder what's going on and hope nothing bad just happened.
 
  INPUTCLEAR and CLEARSELECT don't work (I thought inputclear would...).
 
  Help?
 
 
  --
  Karl L. Pearson
  Director of IT,
  ATS Industrial Supply
  Direct: 801-978-4429
  Toll-free: 888-972-3182 x29
  Fax: 801-972-3888
  http://www.atsindustrial.com
  [EMAIL PROTECTED]
 
  --
  u2-users mailing list
  [EMAIL PROTECTED]
  http://www.oliver.com/mailman/listinfo/u2-users
 
-- 
Karl L. Pearson
Director of IT,
ATS Industrial Supply
Direct: 801-978-4429
Toll-free: 888-972-3182 x29
Fax: 801-972-3888
http://www.atsindustrial.com
[EMAIL PROTECTED]

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users