[U2] Nagging about [AD] tags

2007-12-05 Thread TPellitieri
Scott Ballinger [EMAIL PROTECTED] wrote on Wed, 5 Dec 2007 11:03:50 
-0800

 It also seems to me that the only person on this list arguing
 for more [AD] tags is Charles.  Does anyone else actually feel
 that [AD] tags help to clarify responses in any way; or that
 that the list has a problem with a lack disclosure of some
 posters' possible commercial self-interest?

Yes.  I do.

As others have noted, [AD] tags ideally should be used to disclose 
self-interest.  When someone replies to a problem with Hey, try this 
product when it should really say Hey, pay me to try my product, I have 
a big problem with that.

However, since I'm not the list moderator, I make my complaints to the 
moderator to handle.  Chuck, therefore, in his role as moderator, should 
be one of the few people making these sort of complaints on-list.

There are a few people whose posts I completely ignore in the digests 
because they often fail to mark their ads.  I won't name names, but I also 
won't consider anything they or their company recommends.  And please 
note, Digest readers have no way to filter out messages based on subject 
or sender, since the digests all come from the list with a subject of 
Digest.

I must add that I think an off-list reminder should be sufficient in most 
cases, and that only serious repeat offenders should be called out in 
public.

--Tom Pellitieri
  Toledo, Ohio
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] RE: [UD] BSELECT @SYSTEM.RETURN.CODE anomaly

2007-06-27 Thread TPellitieri
Dean Armbruster wrote on 26 Jun 2007 16:14:21 -0400

 ... This is about BSELECT ...

 @SYSTEM.RETURN.CODE is not supposed to be the number of
 *records* selected.  It is supposed to be the number of
 items in the select list.

I would suggest that, in this case, the documentation is incorrect (or at 
least unclear), not the return code.

Why?  Because BSELECT allows you to select more than one attribute.  From 
the help:

Unlike the SELECT command, which retrieves only record
IDs, BSELECT builds a list of the attributes you name in
the UniQuery statement.

Typically, this command is used to get record ID's stored in one file 
(e.g., BSELECT ORDER.HEADER LINE.KEY), but it can also be used to get a 
SET of fields.  For example, 

BSELECT CUSTOMER WITH STATE = OH NAME PHONE FAX

In this case, I would get a list with (typically) three entries for each 
of my Customers in Ohio:  Name, Phone and Fax, in repeating order.  If I 
have 20 customers in Ohio would expect @SYSTEM.RETURN.CODE to return 20 
(the number of items/records selected), and I would expect SYSTEM(11) 
would have the total number of items in my list (i.e., 60).  However, if 
any of the fields were multi-valued, I would get ALL of those values in my 
list, just as if I had used a BY-EXP in a sort.

 Watch out!  @SYSTEM.RETURN.CODE for BSELECT is not what
 the documentation says it is.  Your list may not have
 the number of entries indicated.  Your list may even be
 empty even though @SYSTEM.RETURN.CODE is greater than zero.

Can you support this last statement?  In every test I ran, 
@SYSTEM.RETURN.CODE was the number of records selected, and @SYSTEM(11) 
was the total number of items.  Of course, I tend to BSELECT FILE WITH 
ATTR ATTR...

--Tom Pellitieri
  Century Equipment

[OFF TOPIC ASIDE]

For what it's worth, I was taught to check SYSTEM(11) for the number of 
items returned by an EXECUTE statement, although typically I don't check 
it at all.  My usual processing loop uses:

CTR = 0
EXECUTE \SELECT ...\
LOOP WHILE READNEXT ID DO
  CTR += 1
  ...
REPEAT

So CTR has my processed count, and if there isn't anything to process, the 
loop exits immediately.

[/OFF TOPIC ASIDE]
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Tandem for UV 10.2 NT--CR not working?

2007-04-09 Thread TPellitieri
Gabriel Green [EMAIL PROTECTED] wrote on Sat, 7 Apr 2007 08:06:56 
-0700

 We use TANDEM a lot ... when I hit Enter or Return it doesn't
 transmit that character--I have to have my user press it on his
 or her keyboard ...

On certain terminals/emulations, some keystrokes are transmitted as 
multi-character sequences.  On UniData, the Esc character has to be 
doubled to send it through a TANDEM session.  For example, on our system, 
Page Up is sent as Esc+something.  I have to press EscPage Up to get 
it through.

I wouldn't expect this with the Return key, but it's possible.  I would 
try the EscEnter sequence to see if it works.  Otherwise, I would 
check the documentation on the TANDEM command for UniVerse to see if, for 
example, control characters need special treatment.

We also use System Builder here, and Esc is the normal close screen 
without saving.  Fortunately, Ctrl+X does the same thing, so I don't have 
to pound on my Esc key too much during tandem sessions.

--Tom Pellitieri
  Century Equipment
  Toledo, Ohio
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] VOCLIB and keeping VOC entries Short and Small, IM RM

2006-10-20 Thread TPellitieri
Jeff Schasny [EMAIL PROTECTED] wrote on Thu, 19 Oct 2006 10:32:55
-0600

 Much as I hate to make editorial comments on a very nice
 writeup, I'd hate for you to go on misusing [sic].

Thanks for the full reference, Jeff.  I would have said something if you
hadn't.

There are two other Latin abbreviations in common usage that are often
misused:

1) e.g. - exampli gratia - for example
2) i.e. - id est - that is

Too often, I see i.e. when e.g. is correct.  i.e. is used to reword
or explain, while e.g. gives a sample.  However, when the sample is the
only choice, i.e. is correct.  The following statements illustrate this.

As most MV programmers know, it is important to choose an appropriate
modulo (i.e., a prime number) for file sizing, but using an excessively
large value on a dictionary (e.g., 10,007) is probably not a good idea.
Anyone from my home town (i.e., Tonawanda, NY) is welcome to contact me
directly.

(Had to keep this on topic, right? :-)

--Tom Pellitieri
  Toledo, Ohio
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] Selection Problem - Index?

2006-09-11 Thread TPellitieri
Under UniData 6.1 on AIX 5.3, I have an index on our WAREHOUSE file for the
Primary Bin Number (PRIM.BIN.NUM, V-type, EXTRACT(@RECORD,1,1,0)).  I get
different results depending on the order of selection.

LIST.INDEX shows the following:

File..  WAREHOUSE
Alternate key length..  12
Node/Block size...  2K
OV blocks.  1 (1 in use, 1 overflowed)
Indices...  3 (2 D-type)
Index updates.  Enabled, No updates pending
Index-Name..  F-type K-type Built Empties Dups In-DICT S/M
F-no/VF-expr
PRIM.VEND.NUM D  TxtYes   No  Yes  Yes S   69
VEND.NUM  D  NumYes   No  Yes  Yes M   97
PRIM.BIN.NUM  V  TxtYes   No  Yes  Yes S
EXTRACT(@RECORD,
   1,1,0)

This set of statements returns correct results:

SELECT WAREHOUSE WITH PRIM.BIN.NUM = 139
551453 records selected to list 0.

SELECT WAREHOUSE WITH PRIM.BIN.NUM = 131
123 records selected to list 0.

SORT WAREHOUSE BY PRIM.BIN.NUM BREAK-ON PRIM.BIN.NUM TOTAL ICOUNT DET-SUPP
ID-SUPP
Primary BinCount
131   15
1329
133   19
134   13
1358
1369
137   12
138   13
139   25
   =
TOTAL123

But this set does not:

SELECT WAREHOUSE WITH PRIM.BIN.NUM = 131
59131 records selected to list 0.

SELECT WAREHOUSE WITH PRIM.BIN.NUM = 139
2114 records selected to list 0.

SORT WAREHOUSE BY PRIM.BIN.NUM BREAK-ON PRIM.BIN.NUM TOTAL ICOUNT DET-SUPP
ID-SUPP
Primary BinCount
131   15
1329
133   19
134   13
1358
1369
137   12
138   13
139   25
14 2
1517
1632
1726
1824
1915
2 23
2021
2125
2223
2320
2420
2516
2613
2715
2821
2936
3 35
3033
31 8
32 5
33 6
34 6
3523
3635
4 30
4012
4126
4217
4313
4418
4513
46 7
4715
4815
4914
5 31
5018
5110
52 8
5313
5418
5512
5613
57 9
5811
5913
6 28
6012
61 5
62 8
6315
6422
65 4
6619
6710
6812
69 6
7 26
7021
7130
7226
7312
7411
7512
7616
7718
7847
7937
8 29
8039
8138
8254
8354
8461
8516
8625
8741
8827
8946
9 28
9048
9158
9245
9348
9422
9515
9616
9717
9816
9915
   =
TOTAL   2114
2114 records listed

Normally, we combine these into a single select, but that doesn't work.
Both of these statements return the incorrect (larger) list:

SELECT WAREHOUSE WITH PRIM.BIN.NUM = 139 AND WITH PRIM.BIN.NUM = 131
SELECT WAREHOUSE WITH PRIM.BIN.NUM = 131 AND WITH PRIM.BIN.NUM = 139

I thought the index might be corrupt, so I tried rebuilding it, but no
luck.

Any thoughts on how to correct this?  I can't separate the select
statements.

Please cc: me directly on replies, as I'm on digest.  Thanks.

--Tom Pellitieri
  Century Equipment
  Toledo, Ohio
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Selection Problem - Index?

2006-09-11 Thread TPellitieri
I originally wrote:

 This set of statements returns correct results:

 SELECT WAREHOUSE WITH PRIM.BIN.NUM = 139
 551453 records selected to list 0.

 SELECT WAREHOUSE WITH PRIM.BIN.NUM = 131
 123 records selected to list 0.
 ...
 But this set does not:

 SELECT WAREHOUSE WITH PRIM.BIN.NUM = 131
 59131 records selected to list 0.

 SELECT WAREHOUSE WITH PRIM.BIN.NUM = 139
 2114 records selected to list 0.

(PRIM.BIN.NUM is indexed)

Wol [EMAIL PROTECTED] wrote on 09/11/2006 09:41:07
AM:

 Just a quick guess as to what's happening ...
 The selects that fail are using the index and ignoring the
 justification :-(

I agree that the first select appears to be using the index alphabetically
(and LIST.INDEX confirms the text index), while the second select uses the
attribute numerically.  That would explain the different results.  However,
it doesn't explain why both of these statements return the incorrect
(larger) list:

SELECT WAREHOUSE WITH PRIM.BIN.NUM = 139 AND WITH PRIM.BIN.NUM = 131
SELECT WAREHOUSE WITH PRIM.BIN.NUM = 131 AND WITH PRIM.BIN.NUM = 139

PRIM.BIN.NUM is a V-type field with a display format of 14L, so it should
be treated as left-justified.  Regardless, I would expect the joint
selection should be either pure numeric or pure alphabetic!  Hence, my
frustration.

Please note that since we're using SB+, we're in Pick Flavor.

--Tom Pellitieri
  Century Equipment
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Selection Problem - Index?

2006-09-11 Thread TPellitieri
Thomas Derwin [EMAIL PROTECTED] wrote on 09/11/2006 10:18:29 AM:

 The index says the K-type for your PRIM.BIN.NUM is Txt, so looks
 like the dict it's based on is left-justified (e.g. 3L) rather than
 right-justified (e.g. 3R).

Colin Alfke [EMAIL PROTECTED] wrote on 09/11/2006 10:37:43 AM:

 Make sure the dict for PRIM.BIN.NUM is set to R# ...

Unfortunately, our normal Bin Numbers are alphanumeric (e.g., A 6 B 2),
so the Text format is required.  These non-standard bin numbers were
inherited when we merged with another company.

Even so, as I said in an earlier reply, why would this fail?

SELECT WAREHOUSE WITH PRIM.BIN.NUM = 131 AND WITH PRIM.BIN.NUM = 139

Whether you look at the data numerically or alphabetically, I shouldn't see
bin numbers that don't begin with 13.

==

Allen Egerton [EMAIL PROTECTED] wrote on 09/11/2006 10:49:05 AM:

 3)  If you want the combined select, I'd try:
 SELECT WAREHOUSE WITH PRIM.BIN.NUM  130 AND WITH PRIM.BIN.NUM  140

We're in ECLTYPE P, which requires the quotes.  Also, my users wouldn't
understand why 13DWG would be included in this selection.

==

David A. Green [EMAIL PROTECTED] wrote on 09/11/2006 10:50:40 AM:

 Also try using BETWEEN like this:
 :SELECT WAREHOUSE WITH PRIM.BIN.NUM BETWEEN 131 139

Also a problem in ECLTYPE P - the specified strings are NOT included with
the BETWEEN keyword.

--Tom Pellitieri
  Century Equipment
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UD] Indexing 'Best Practices'

2006-08-02 Thread TPellitieri
Kate Stanton [EMAIL PROTECTED] wrote on 2 Aug 2006 18:11:11 +1200

 I would go for the simplest solution to operate and maintain,
 almost to hell with machine efficiency.  You (or anyone else
 trying to follow you) are probably the most critical and
 expensive resource.

I must disagree with your reasoning.  System response time is critical in a
customer service situation.  If a customer has to wait a noticeable time
because the programmer didn't make an effort to provide efficient code,
it's a waste of the customer's time - and I would suggest that a customer's
time is a company's most critical resource, and wasting it is your most
expensive mistake.

--Tom Pellitieri
  Century Equipment
  Toledo, Ohio
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Client using Dynamic Connect with SBPlus

2006-05-19 Thread TPellitieri
We mostly use AccuTerm here, but have a few SBClient licenses for
testing/trial purposes.  As Susan Joslyn noted, the Wyse-60 emulation seems
to work well, and that's what we use.  It also works well with our Link MC5
terminals.

As to program controls - you could always determine if you're using an
SBClient emulation by checking TERM.DEFN15.  The first three characters
are usually TU. for SBClient terminal types.  If this is the case,  you
can proceed with SBClient downloads, etc.  Otherwise, you would need to
provide alternative interface software.

Just a thought...

--Tom Pellitieri
  Toledo, Ohio
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] TIME

2006-04-07 Thread TPellitieri
Don Verhagen [EMAIL PROTECTED] wrote on 06 Apr 2006 15:50:24 -0400

 We are in 4 times zones in the US and 2 Daylight Savings
 Time (Arizona and parts of Indiana do not observe DST).

Please be aware that, as of this year (2006), Indiana observes Daylight
Savings Time.

The state is still split between Eastern and Central time, however.

--Tom Pellitieri
  Toledo, Ohio (about an hour from the state line...)
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UD] Setptr

2006-03-24 Thread TPellitieri
Bill Haskett [EMAIL PROTECTED] wrote on 23 Mar 2006 19:46:16 -0800

 If I generate a report to _HOLD_ by using SETPTR 0,3 can I
 then send the report to another printer, say unit 2, by using
 SETPTR 2 just before I SPOOL _HOLD_ P_.?

The first parameter of the SETPTR command allows a unit to be specified so
that you can direct data to multiple print jobs.  It does not tie a job to
a specific printer.  The DEST parameter does that.

The SPOOL command sends the job to your current printer, so you would need
to use the DEST parameter on a SETPTR command first to select your printer.

I use the first parameter to control print jobs in my check printing
routine.  I issue a SETPTR 1,... for the checks and a SETPTR 2,... for the
copies.  The code creates the print jobs in parallel using PRINT ON 1 or
PRINT ON 2 to direct the output to the appropriate job.  Naturally, I use
FOR PTR = 1 TO 2 ; PRINT ON PTR ; NEXT PTR syntax to do most of the work.

From TCL, if you type SETPTR with no parameters, you will see the current
settings.  Here's my current output (AIX):

Unit   0
Width  133
Length 65
Top margin 0
Bot margin 0
Mode   1

Options are:
Noeject
Nfmt
Nhead
Nomessage
Destination 1ACCT
Copies 1.

Spooler  options: lp -c -n1 -d1ACCT

The original command was

SETPTR 0,133,65,0,0,1,NFMT,NOEJECT,NOMESSAGE,DEST 1ACCT,COPIES 1,NHEAD

For a Hold  Suppress (Mode 3) or Hold  Print (Mode 6), I typically
replace NHEAD with a BANNER or BANNER UNIQUE tag to control the job name in
the _HOLD_ file.

--Tom Pellitieri
  Century Equipment
  Toledo, Ohio
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Changes to the List

2006-03-16 Thread TPellitieri
Mike Preece [EMAIL PROTECTED] wrote:

 What do people think of the idea of moving this list to a google
 group instead?

Jerry Banker [EMAIL PROTECTED] replied:

 Don't go there. I think this was discussed many times and the consensus
 was no.  I personally hate, is hate too strong a word, having to go to
 a group site to find out what is going on. Most of the people on this
 list work for a living and don't have the time to search out answering
 questions for free but if it comes into their mailbox and they've got
 the time they may give a hand.

For those familiar with comp.databases.pick, I have one word:
[EMAIL PROTECTED] grumble

My biggest problem with the Useet-style newsgroups is that they are
unmoderated.  There is no one to control the content or administer cyber
spankings when appropriate, nor can offensive content be removed.

As Jerry pointed out, it is easier to have messages pushed to the mailbox
than to have to pull them from a website.  I'm subscribed for digest
reading, and I really appreciate being able to receive the digests for
several reasons, primarily:

1) As sole computer support person for my company, my e-mail client is set
to provide an audible and visual alert every time a new message arrives.
When an active discussion starts on the list, I can't afford the steady
stream of interruptions.

2) With newsgroups, I often have to wade through old messages to find the
newer ones, especially for a topic that goes on for several days.  With the
current digests, I only receive the newest posts, and can quickly browse
the topic list to find the messages of interest.

Considering that Larry has been kind enough to host the lists for the group
gratis, like Clif before him, I would suggest that his opinions should
carry great weight.

Just my plug nickle...

--Tom Pellitieri
  Toledo, Ohio
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] To DIM a passed Matrix or not ?

2006-03-07 Thread TPellitieri
Jacques G. [EMAIL PROTECTED] wrote on Mon, 6 Mar 2006 07:51:51 -0800
(PST):

 In Universe, it isn't necessary to DIM a matrix that
 has been passed in a subroutine.  So my question is,
 are there MV flavors where it is neccessary to do so ?

We use UniData with Pick flavor (under SB+).  I tried this test program:

SUBROUTINE MAT.TEST(MAT PARM)
FOR I = 1 TO 100
   PRINT PARM(I):, :
   IF NOT(MOD(I,10)) THEN PRINT
NEXT I
PRINT Done!
RETURN

When I tried to compile it, I got these errors:

Compiling Unibasic: BP/MAT.TEST in mode 'p'.
warning: PARM may be one dimension matrix.
redefined variable PARM near line 3
matrix PARM undefined.
compilation failed

I had to add the DIM PARM(100) statement to get this to compile.

Please note that the CALLING program determines the size of the array, not
the subroutine.  With the example above corrected, I tried the following
program:

DIM CHK(50)
FOR I = 1 TO 50
   CHK(I) = I * I
NEXT I
CALL MAT.TEST(MAT CHK)
STOP

When I ran the program, it bombed out when I=51, since CHK was only
dimensioned to 50.

Suggestion with this syntax:  include the size of the array as a parameter.
My corrected versions of these programs follow:

DIM CHK(50)
FOR I = 1 TO 50
   CHK(I) = I * I
NEXT I
CALL MAT.TEST(MAT CHK,50)
STOP

SUBROUTINE MAT.TEST(MAT PARM, SIZE)
DIM PARM(SIZE)
FOR I = 1 TO SIZE
   PRINT PARM(I):, :
   IF NOT(MOD(I,10)) THEN PRINT
NEXT I
PRINT Done!
RETURN

--Tom Pellitieri
  Century Equipment
  Toledo, Ohio

BE KIND!  DON'T OVERQUOTE!!
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Is there a Better Editor?

2006-02-22 Thread TPellitieri
Michael Caskey [EMAIL PROTECTED] wrote on Tue, 21 Feb 2006 16:10:06 -0700

 I have been tasked with creating reports from our UniData
 system using UniQuery. ...

 1. Is there a better way to run these queries?
 and
 2. Is there a better query editor; text-based or GUI or both?

Others have posted suggestions for external tools, but assuming you don't
have access to these, there are some things you can do within UniData to
simplify your life a bit.

There are three editors that come with UniData: ED, AE and SE.  ED and AE
are line editors, and AE is the more powerful one.  Our system has ED
remapped to AE, so we don't use ED at all.  SE is a screen editor, and some
find it easier to use.

If you are setting up queries that you need to run on a regular basis,
consider using UniData Paragraphs.  These can be run from the TCL prompt as
commands once they're written.

Paragraphs are stored in VOC, and are similar to DOS Batch files.  You can
specify parameters and save queries for future use.  You can also put
several commands together to create a process.

There are a few native ones that you can look at for reference.  Here are
three from our UniData/AIX system.

LISTDICT is used to list dictionary items.  The syntax is LISTDICT FILE
NAME [LPTR]

Top of LISTDICT in VOC, 8 lines, 317 characters.
001: PA
002: IF C3,DISPLAY = '' THEN GO L100
003: IF C3,DISPLAY = 'LPTR' THEN GO L200
004: IF C3,DISPLAY # 'lptr' THEN GO L100
005: L200: SORT DICT I2,FILE NAME TYP LOC CONV MNAME FORMAT SM ASSOC BY
TYP BY LOC BY @ID LPTR
006: GO DONE
007: L100: SORT DICT I2,FILE NAME TYP LOC CONV MNAME FORMAT SM ASSOC BY
TYP BY LOC BY @ID
008: DONE: *

Note that Attribute 1 is set to PA to indicate that this is a paragraph.
The lines after that are processed.  Parameters are specified using double
angle brackets, and contain two fields.  The first field indicates the
parameter type (I=Required Input, C=Conditional Input) and position.  The
second field is a prompt to identify the parameter, and will be used if a
required input is not specified.

I wrote LP to list print jobs waiting to print in our AIX queues.  If no
queue is specified, all items in all queues are listed, otherwise only the
specified queue is listed.  Note that I'm executing AIX commands from TCL
by prefixing the command with the ! character.

Top of LP in VOC, 6 lines, 96 characters.
001: PA
002: IF C2,QUEUE = '' THEN GO L100
003: !lpstat -pC2,QUEUE
004: GO DONE
005: L100: !lpstat | more
006: DONE: *

CP is a simple paragraph to alias the SPOOL command.

Top of CP in VOC, 2 lines, 38 characters.
*--: P
001: PA
002: SPOOL I2,FILENAME I3,ITEMID

Check the manuals for more help, or feel free to drop me a line off-list.

--Tom Pellitieri
  Toledo, Ohio
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] GOSUB variable-name?

2006-02-16 Thread TPellitieri
On 14 Feb 2006, Serguei [EMAIL PROTECTED] wrote:

 Why not instead of CALL SomeProg('GetCustomerBalance',...)
 and CALL SomeProg('PaintScreen',...)
 do:
 CALL GetCustomerBalance
 Call PaintScreen

On 16 Feb 2006, Serguei [EMAIL PROTECTED] wrote:

 ... never again anywhere in your programs you will
 have to write
 READ RECORD FROM FILE,KEY THEN
 or
 READ RECORD TO FILE,KEY THEN
 Just do:
 CALL IO.PROGRAM('READ',TABLE.NAME,KEY,RECORD,OK)
 or
 CALL IO.PROGRAM('WRITE',TABLE.NAME,KEY,RECORD,OK)

Okay - which is it?  Should one write a single routine to handle multiple
functions or not?

You have promoted both viewpoints as absolutes.

--Tom Pellitieri
  Century Equipment
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] DCOUNT

2006-01-06 Thread TPellitieri
Mark Johnson [EMAIL PROTECTED] wrote on Thu, 5 Jan 2006 00:21:37
-0500

 I'm finding that I'm doing a lot of programming for the processing
 through multi-valued attributes.

 I'm wondering if the method I'm using is the best way to determine
 the last element.

 LAST=DCOUNT(REC15,@VM)
 FOR I=1 TO LAST
  (process something)
 NEXT I

If you're working with ASSOCIATED multi-values and you need to process
every one, this may be your best bet, although there are some other
options.

If you just need to process each item in a single multi-valued attribute
(without updating the original), you could consider:

REC15 = RAISE(REC15)
SELECT REC15 TO R15.LIST
LOOP WHILE READNEXT MV FROM R15.LIST DO
  (process MV)
REPEAT

For example, I use the above syntax to process each line in a sales order,
where the multi-value in the order header contains the keys to the
individual line items.

If your controlling multi-value is sorted and you only need to process a
known value, you can use the LOCATE function to find the appropriate spot.
With associated multi-values, you'll need to use the INSERT (or DELETE)
function on the associated items to add (or remove) value groups from the
list.  Note that these functions are flavor dependent.

--Tom Pellitieri
  Toledo, Ohio
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] Re: The Venerable Ken Wallis

2005-12-19 Thread TPellitieri
Ken Wallis [EMAIL PROTECTED] wrote on Sat, 17 Dec 2005 16:21:34
+1100
RE: [U2] LOGTO question...

  colin alfke wrote:

  Here is a snip of a post the venerable Ken Wallis made a while
  back explaining how a program is found.

 I'm not convinced that I like being referred to as 'venerable' ;^)

The American Heritage Dictionary (4th Ed., 2000) has as it's first
definition of venerable:

Commanding respect by virtue of age, dignity, character, or position.

I see nothing to object to here, except maybe the age part... :-

--Tom Pellitieri
  Toledo, Ohio
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UD]Error Codes

2005-07-28 Thread TPellitieri
[EMAIL PROTECTED] wrote on Thu, 28 Jul 2005 09:04:08 +0200

 We are trying to find a way to capture results from our
 nigthly batch runs to a log file. That log file is then
 read to trigger warnings or critical alarms.

 We'd like to use the RETURNING clause in the EXECUTE statement
 to capture output from the batch programs.

You might want to use the CAPTURING clause as well, e.g.

EXECUTE COMMAND CAPTURING CRT.TEXT RETURNING ERR.CODES

The CAPTURING clause will return anything that would normally be sent to
the terminal, including the human-readable error messages.  Under UniData,
the RETURNING clause includes any spooler entry numbers created as well as
the error codes.

--Tom Pellitieri
  Toledo, Ohio
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] THE variable names

2005-07-19 Thread TPellitieri
Will Johnson wrote on Tue, 19 Jul 2005 01:55:51 EDT

 Remove does not confuse me.  Remove unnecessarily confuses other
 people. ...
 READNEXT works just find for processing a multi-item list just as
 REMOVE does and it's much more widely used and understood.

 So I see no point to the Remove command at all.

The important difference between using READNEXT and REMOVE is that READNEXT
will return the entire next item, while REMOVE only returns up to the next
system delimiter.  If you have value marks or sub-value marks in your
attributes, REMOVE will break them up into their individual components,
whereas READNEXT will not.

To my mind, the READNEXT structure is more straightfoward if you need to
process each attribute separately.  The REMOVE command requires setting a
variable, which usually should be checked to ensure that the correct
delimiter was encountered.  It is useful when you need to process each
individual value separately.

As is often the case, we have a variety of specialized tools, and we need
to use the appropriate tool for each task.  For example, one could use a
torque wrench to tighten every single nut and bolt in the world, but for
most applications, this isn't necessary, and in some cases, is more
difficult to use.

REMOVE has its uses (there is a point to it), but the original post (if
anyone recalls that! :-) was concerned with using DCOUNT followed by a FOR
loop, and I believe the LOOP WHILE READNEXT ITEM FROM ITEM.LIST syntax is a
more straightforward alternative than the REMOVE syntax.

--Tom Pellitieri
  Toledo, Ohio
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] SYSTEM(20)?

2005-07-14 Thread TPellitieri
Norman Morgan [EMAIL PROTECTED] wrote on Wed, 13 Jul 2005 13:51:59 -0500

 I need to find a workaround for a D3 feature that I have become
 dependent on.  SYSTEM(20) returns the number of the last spooler
 entry you created.

DICT _HOLD_ NEXT.HOLD contains the next job number to use.  Reading this
value would give you the next entry to be created, provided no one else
gets in ahead of you :-

The SETPTR command also includes the option BANNER which will allow you to
name the print job.  We have used this option to have weekly reports stored
in _HOLD_ so we could find the items automatically.

For example, using

SETPTR 0,133,65,0,0,3,NOEJECT,NFMT,COPIES 1,DEST queue,BANNER
name,NOMESSAGE,BRIEF

creates an item in _HOLD_ with the ID of name.  We find this extremely
useful for reports run weekly or monthly, since we sometimes need time to
extract them from _HOLD_ before they get over-written.

You could also use BANNER UNIQUE name, which would create the item
name_seq, where seq is the sequence number obtained from DICT _HOLD_
NEXT.HOLD.

--Tom Pellitieri
  Toledo, Ohio
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] THE variable names

2005-07-11 Thread TPellitieri
Mark Johnson wrote on Sun, 10 Jul 2005 23:12:25 -0400

 I'll yield to the REMOVE for this U2 forum. ...

 - Original Message -
 From: Womack, Adrian [EMAIL PROTECTED]
 
 Mark, I don't like your example...

 snip REMOVE example

 I've never understood this need some programmers have for
 COUNTing the elements in an array - who cares who many there
 are?  Usually the program just needs to process *all* of them.

The problem I have with REMOVE is that it only returns up to the next
delimiter.  If you have subvalue marks, you only get the first subvalue,
rather than the list.  Of course you can check the delimiter after each
REMOVE, but in a case like this, I prefer to SELECT to a list variable and
READNEXT each item.  So, instead of:

PRODS=ORD15
C.PRODS=DCOUNT(PRODS,CHAR(253))
FOR I=1 TO C.PRODS
   PROD=PRODS1,I
NEXT I

I prefer:

PROD.LIST = 
PRODS = RAISE(ORD15)
SELECT PRODS TO PROD.LIST
LOOP WHILE READNEXT PROD FROM PROD.LIST DO
  ...
REPEAT

(And in this case, the PROD.LIST =  prevents a compiler warning about
unitialized variables...)

--Tom Pellitieri
  Century Equipment
  Toledo, Ohio
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] spool images going to word documents

2005-07-05 Thread TPellitieri
Bob Witney [EMAIL PROTECTED] wrote on Mon, 4 Jul 2005 14:20:07 +0100

 I am building an email as follows to send a report as a word
 attachment via sendmail from aix 5.2 (Universe 10) ...

Okay...something funky happened with this in the digest.  The problem you
reported appeared there!  After the line containing [if gte mso 9], the
entire rest of the digest is one long string of characters.

Don't know why, but perhaps there's an embedded special character turning
things weird.  It might be the xml tag, but that doesn't make sense to
me...

--Tom Pellitieri
  Century Equipment
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] Printing PDF from UniData/AIX

2005-07-01 Thread TPellitieri
Is there a way to print PDF files from AIX using a command from UniData?

One of our vendors has provided a PDF file that they want us to include
with shipments of their product.  It would be nice if I could have my
existing process determine that a qualifying product is being shipped, and
automatically print a copy of the PDF, rather than having to keep a stack
on hand.  Our shipping departments use terminals, and personnel do not
always have PC access.

I know Adobe has Acrobat Reader for Unix.  I've downloaded it from their
website, but have not installed it since I don't have a graphic/wysiwyg
terminal connected to our AIX box.  Does anyone know of an AIX command line
or script that would let me specify the PDF file  printer and have Acrobat
(or some other program) print it correctly?

Thanks.

--Tom Pellitieri
  Century Equipment
  Toledo, Ohio
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Printing PDF from UniData/AIX

2005-07-01 Thread TPellitieri
[EMAIL PROTECTED] wrote on 07/01/2005 5:53 PDT

 Is there a way to print PDF files from AIX using a command
 from UniData?

Troy Buss of Logitek Systems replied off-list on 07/01/2005 15:18:40 EDT:

 As a one time setup, you can also print the PDF to the printer
 using the correct windows driver but select 'print to file' and
 take the output file that would have gone to the printer and put
 it in the AIX filesystem, then shell out (of unidata) and print
 the file using lp cat or some other aix command to send the file
 directly to the printer.

I tried that.  I did a binary ftp to put file in /tmp, and tried lp -d
queue /tmp/file.  The escape sequences for the PJL got stripped off,
and I had to cancel the job.

The printers are connected to the network JetDirect cards, and some of them
are old (e.g., HP 4+).  I don't know how to use cat to send data to an IP
address, or I would have tried that.  Besides, my users specify an AIX form
queue to have documents print there - I can't change that end of the logic.
I need to be able to use the form queue name to determine where to print
it.

Thanks for the suggestion, however.

--Tom
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] U2 XML./DB Tool

2005-05-27 Thread TPellitieri
Phil Walker wrote on Fri, 27 May 2005 9:54:17 +1200

 3. IBM, why would the flavour of an account effect the use
 of a client tool such as U2 XML/DB Tool? Is this a design
 oversight? - or was it assumed that users would change the
 account flavour, ...

This is not the only tool that requires a certain flavour.  SB+ requires
Pick flavour to operate correctly.  Remember: the flavour not only affects
syntax, but also the symantics of certain commands.  Take a look at the
help for the LOCATE command for a prime example of how the same syntax
generates different results.

Under SB+, there are ways of changing flavour from Pick to Native on the
fly, but since I work primarily in Pick flavour, I don't know if the
reverse is true.  Under UniData, take a look at the help for the ECLTYPE
command and the BASICTYPE compiler directive for additional information.

--Tom Pellitieri
  Century Equipment
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Dymanic vs Dimensioned

2005-05-16 Thread TPellitieri
Charles Stevenson wrote on May 14, 2005 8:24 AM:

 Do you know why dimensioned arrays were first limited to
 only 1 or 2 dimensions in Pick or Info-Basic?

I started my computing life with BASIC on a PDP-11/03 and FORTRAN on a CDC
Cyber 173 system.  I believe the dimension limit was there to avoid
complicated memory addressing.

Dimensioned arrays were stored in consecutive memory.  DIM X(10,10)
reserved 121 spaces (0-based indexing was the default).  In order to access
X(5,7), you would take the base address of X and add 7*11+5 to get the
correct memory address.

This naturally expands when you increase dimensions.  For example, DIM
Y(10,10,10) for item Y(3,5,4) would calculate (4*11+5)*11+3 as the offset.
Extending this to more dimensions is left as an exercise for the reader :-

(I knew there was a reason they made us learn assembly language...)

--Tom Pellitieri
  Century Equipment
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] Please, Be Kind Trim

2005-04-18 Thread TPellitieri
Just a reminder to be kind and trim your replies to the relevant portions
of prior posts.  I just received the second digest for today, which
contained just 12 new messages.  Several contained the full text (including
posting footers) of three prior messages.

Some people on the list still have to worry about access time and mailbox
limits.

Thanks.

--Tom Pellitieri
  Century Equipment
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] ACOS problem (floating point numbers)

2005-04-15 Thread TPellitieri
Adrian Womack wrote on Fri, 15 Apr 2005 08:55:52 +0800

 A CRT of ACOS(1) and ACOS(TEMP) where TEMP = 1 also returns
 zero for me.  That's not the problem.

 Try the code in my example, the variable VAR4 displays as
 1 - but is probably slightly higher than 1 internally.
 It's in this situation where I get the error message.

That's to be expected.  Since cosine can only take on values between -1 and
1, passing a number outside that range will cause an error.  The
documetation for UniData states that the function will issue the error
message and return a value of 0 in this instance.

Mike Dallaire wrote on Thu, 14 Apr 2005 9:54 PM

 I did misunderstand how UV is using ACOS.  ACOS or Arc
 Cosine is the mathematical inverse of Cosine.  In UV
 though, it is treated like cos -1 (the inverse function
 on most calculator's cos key).  This value is not the
 mathematical inverse.

Umm... the mathematical inverse of cosine is secant, i.e., cos x = 1/(sec
x).  Likewise, the mathematical inverse of sine is cosecant, and of
tangent, cotangent.  Arc trig x has, to my knowledge, always been the
angle who's trig is x

--Tom Pellitieri
  Toledo, Ohio
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] Re: [u2] Printing Different

2005-02-14 Thread TPellitieri
I get digests, so my apologies if this is a bit late...

There are a few cautions about mixing font types on a report that no one
mentioned.  If you use a proportionally spaced font (like Arial) and want
to align values (e.g., right-justified numbers), you must remember that
spaces are not as wide as numbers, so you are forced to use cursor
positioning commands to align things properly.

Also, if you are alternating between two fonts, it is sometimes more useful
to define your primary and secondary font characteristics and toggle
between the two.  The Primary Font selection commands begin Esc:(s, while
the secondary font selection commands begin Esc:)s.  Once you have both
set, you can send ASCII Shift Out (Char(14)) to switch to your secondary
font, then ASCII Shift In (Char(15)) to switch back.

As previously mentioned, it's often safer to do your various fonts in
layers.  If you are isolating one font per line, you don't really need to
do this.  However, a different font may require a different Vertical Motion
Index (VMI) to display properly.  The VMI is the amount of vertical space
to use for each line.  If you use a 24 point font mixed with 12 point
fonts, the 24 point font's VMI is double the 12 point font in the same
typeface, so you'll need to account for that if you want to control your
page breaks properly.

--Tom Pellitieri
  Century Equipment
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UV] examples of X[n], X[m,n], X[c,m,n] substring extractions and assignments

2005-02-04 Thread TPellitieri
Charles Stevenson wrote on 3 Feb 2005 at 23:16:59 -0500:

 I wrote these examples up for our own programmers.
 Might as well share them with the group for the
 newbies' sakes.

A caution:  these apply to UniVerse.  UniData doesn't support the third
syntax (X[c,m,n]).

Also, UniData may give different results, based on BASICTYPE and the Null
Value Handling settings.  In BASICTYPE U, it should work as Charles stated.
In BASICTYPE M and P (we are always set with P, as we use SB+), the string
can be reduced or cleared on assignments.  According to the help, if Null
Value Handling is on, the X[3] syntax will give a warning, and a zero will
be used.  I don't know if it will make it X[3,0] or X[0,3], however.

I put all of Charles' examples in a program and got the following results
(using * before and after the string to show the lack of spaces...)

X:  *AB-CD-EF-GH*

X[3]:   *-GH*
X[2,3]: *B-C*

X[2,1] = 1:   *A1-CD-EF-GH*
X[2,3] = 123: *A123D-EF-GH*
X[3] = 123:   *AB-CD-EF123*

X[2,1] = 123: *A123-CD-EF-GH*
X[2,3] = 12:  *A12D-EF-GH*
X[3] = 12:*AB-CD-EF12*
X[3] = :  *AB-CD-EF*

So, remember, your mileage may vary :-

--Tom Pellitieri
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] u2ug 2005 Board Candidates

2005-01-27 Thread TPellitieri
As you are hopefully aware, this list is hosted by the International U2
Users' Group.  Our first election is coming up soon.  I have posted the
list of candidates today, along with some photos and biographies, on the
website at http://www.u2ug.org (use the Candidate Biographies link in the
text on the front page).  Not all the candidates have submitted information
at this time, so there will likely be several updates over the next few
days.

--Thomas R. Pellitieri
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] K = K

2005-01-19 Thread TPellitieri
Date: Wed, 19 Jan 2005 13:29:15 -0600
Marilyn Hilb [EMAIL PROTECTED] wrote:

 I frequently see this type of line K = K in the code
 I work on and never understood why.

 -Original Message-
 From: Andrea Charles [mailto:[EMAIL PROTECTED]

 Do you need the K = K ?
 --
 ... (Code from Charles Stevenson)

 REMOVE DUM FROM K SETTING MORE ; check for any delimiters
 K = K ; * reset rmv ptr in case calling pgm cares.

According to the UniData Help for REMOVE, in the code sample above, DUM
would be set to the first string delimited by a standard delimiter (e.g.,
@AM, @VM), and MORE would be set to index the level of the delimiter
encountered: 0=End of array, 1=Record Mark (255), [EMAIL PROTECTED] (254), 
[EMAIL PROTECTED] (253),
etc.  A pointer is maintained so that the next REMOVE X FROM K would return
the next string.

The comment is stating that the K = K is used to reset the REMOVE pointer
to the beginning of the string.

Further info on using REMOVE:

REMOVE is useful for sequentially processing all the elements of a dynamic
array without having to recount for each subsequent item.  However, you
need to check your delimiters to find attributes/values/subvalues.  A
similar method to process each attribute is to SELECT K TO KLIST and then
READNEXT DUM FROM KLIST within a loop.

--Tom Pellitieri
  Century Equipment
  Toledo, Ohio
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] The list format and usefulness

2004-12-21 Thread TPellitieri
Clif [EMAIL PROTECTED] wrote on Mon, 20 Dec 2004 21:31:17 -0800

 Full content. A lot of times watching how someone else is
 thinking is more instructive than what they are thinking.

I wholeheartedly agree!  I subscribe only to the digests, in part from
being distracted 100 times a day, but mostly because I can more easily
archive a thought process thread.

 For a problem, an answer is enough. To learn how to solve
 a class of problems, watching the process that more
 experienced (or even just different) techs go through is an
 education worth the noise on the channel.

Besides, the last GOTO discussion was not just a zealot's campaign -
there were instructive issues raised regarding benchmarking and coding
efficiency, not just syntax.

Now, if people would learn to trim the original disclaimers from their
replies... :-

--Tom Pellitieri
  Century Equipment, Toledo Ohio
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] PCL point question.

2004-12-07 Thread TPellitieri
George Gallen [EMAIL PROTECTED] wrote on Tue, 7 Dec 2004 13:27:51
-0500

 I'm trying to put together some labels using PCL.

 I was told to use 10point font. I'm using a font that is fixed,
 so the printer is ignoring the point size setting esc ( s # V

 I'm using the pitch setting instead esc ( s # H

Point and Pitch sizes can be used in combination depending upon the font
(e.g., Letter Gothic permits 6.5pt and 12pt 10cpi on some older printers).
Courier is not one that accepts both, and pitch has precedence over point
size in this case.

Typically, Courier 10 Pitch is approximately 12 point, and Courier 12 Pitch
is approximately 10 point.  These sizes used to be called Pica (10cpi) and
Elite (12cpi), back when people typed letters as opposed to the typesetting
they can now do at their desktops.

We use Avery 5160 labels here, which are 10 labels per 8.5x11 page, 3
across, 10 down.  I use the following setup strings.  The font [(s] selects
12cpi Courier.  The Page format [l] (that's the letter L) provides for 8
lines per inch, a 4 line top margin, and 80 printed lines per page.

(esc) (s0p12h0s0b4099T (esc) l8d4e80F

My label settings for a SORT-LABEL command in UniData are 3 columns, 7
rows, 1 row skipped between labels, 0 indent, 30 columns per label, 3
blanks between labels.  The control string is the first line of the output
file.  Lines 2-8 contain 7 rows of label data, and line 9 is blank.
Subsequent labels use another 7 lines of data followed by one blank.

Hope this helps.

--Tom Pellitieri
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


[U2] Resizing All Files in a System

2004-11-24 Thread TPellitieri
Is there a way to semi-automagically resize all the files in a UniData
account/system?

When we used Pick D3, we could run a process which would store the mod to
use on restore in the file definition item.  If we did a full system file
save and restore, the files would be recreated with the new and improved
mod.  We use to do this on a fairly regular basis, but since changing to
UniData, we haven't really addressed this.

I know I can use guide to get suggested resizing, and that I can use
memresize to actually resize an individual file, but is there a way to do
this system wide?  We are considering migrating to a newer machine, and
since we would have a system with no users on it for a while, it seems to
be the best time to implement a massive update.

Pointers to the correct manual would be appreciated, or a brief summary.
I'm certain that this has been discussed before, but I couldn't find it in
the archives.

--Tom Pellitieri
  Century Equipment
  Toledo, Ohio
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


[U2] UniData vs Pick/D3 BASIC (was Greetings)

2004-11-23 Thread TPellitieri
Norman Morgan [EMAIL PROTECTED] wrote on Mon, 22 Nov 2004 08:45:51 -0600

 I am brand new to UniData after using Pick/D3 with SB+ for 9 years ...

Hey, Norman!  Welcome to the list!

 I have looked for a concise list of differences between D3 Basic and UD
 Basic, but can't find one.  I have run into a few snags so far, things
 that just won't compile, but I am also concerned about hidden gotchas ...
 subtle differences in behavior where the syntax appears to be
 compatible.  Can anyone point me toward such a list?

I haven't seen an actual list, although I had created a list of the
differences that should still be in the list archives.  I'll take a look
and e-mail you a pointer if I find it.

 Among the things I have encountered so far:
 ...
 3.  Reading/writing directly to Unix files: no %OPEN,%READ,%WRITE,
 %CLOSE, etc.

Check the help for the OPENSEQ, READSEQ, WRITESEQ, CLOSESEQ and related
commands.  You need to specify the full *nix path (e.g.
/ud/BRAKE-DATA/MYPROGS/PROGRAM) if you want to access a file outside of the
current directory.  From the SB+ TCL prompt, you can use the ! to run a
*nix command.  !pwd in particular will show you the current directory.

 4.  No SP-ASSIGN ? syntax to query the current printer assignment.

This is actually easier in UniData - the function GETPTR(0) returns the
parameters required for a SETPTR command.  I use the following to save and
restore the printer settings:

ZZZPTR = GETPTR(0)
...
EXECUTE SETPTR :ZZZPTR:,BRIEF

 6.  More reserved words than D3

The worst of these is PAGE.  I had to rewrite more programs for this
keyword than any other.

The UniData HELP also has a keyword feature.  If you type HELP -K
keyword, you will get a list of help topics containing that keyword.  For
example, on my system HELP -K SEQUENTIAL lists 24 items, including 14
UNIBASIC keywords.

Another area that will probably drive you a bit bonkers is the way printer
files are handled.  Once they're spooled to *nix, you can't manipulate
them.  Jobs on Hold are placed in the file _HOLD_, and there are some
things you can do with the BANNER [UNIQUE] options on SETPTR to control how
those are named.  By default, SB+ uses BANNER UNIQUE @USER.ID.  Items in
_HOLD_ can be edited normally.

I have several UniData Paragraphs I created to give some functionality that
I felt was missing, especially for print queue stuff.  E-mail me off list
if you're interested.

--Tom Pellitieri
  Century Equipment
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Stopping HP Laser Printer line creep

2004-11-22 Thread TPellitieri
Al DeWitt [EMAIL PROTECTED] wrote on 19 Nov 2004 17:59:16 -0600

 UniData 6.0.12 // SB+ 5.2.4

 I have a basic program that originally ran on a line printer
 to print preprinted forms.  I am converting it to print on a
 laser.  I'm having problem with line creep.

Others have made some good suggestions - one other thing to check.  On our
system, the SB+ Printer Class Definitions are set to 65 lines, but on the
physical printer, the page length is set to 66 lines.  This was recommended
by our VAR, and I never really got a good explanation as to why, but it
does work.

Also, if you're printing from BASIC, I recommend printing CHAR(12): to
start a new page, rather than relying on a fixed number of lines per page.
My standard code looks a bit like this:

NEWPAGE:
  IF PAGE.CTR = 0 THEN PRINTER ON ELSE PRINT CHAR(12):
  PAGE.CTR += 1
  PRINT report header:SPACE(as needed):Page :PAGE.CTR
  ...
  RETURN

I use a LINE.CTR to track the number of lines printed, and check for a page
break where needed.  This also allows me to keep multiple line data
together where necessary.  For example, on our invoices, the Product
Description appears on the line below the Product Number.  If there's only
one line available on the current page, I start a new one.

Hope this helps.

--Tom Pellitieri
  Century Equipment
  Toledo, Ohio
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] PCL5/6 Universe / AIX printer setup question

2004-11-18 Thread TPellitieri
 Anyone have any insight on SMIT for AIX and how to set it up to eliminate
 character translations?

Here are the settings I currently have on my main print queue.  We use AIX
5.1 with UniData 5.2 and SB+ 5.2.

To see these settings, do the following:
1) At the AIX prompt, type smit
2) Choose Print Spooling
3) Choose Change / Show Print Queue Characteristics
4) Enter the Queue Name
5) Choose the Setup Option

Under Option 2: Default Print Job Attributes, I have the following:

[TOP]   [Entry Fields]
* Print queue name1ACCT
* Printer name[EMAIL PROTECTED]

  -- Text Print Options -
* TYPESTYLE and PITCH lineprinter  17
  Print QUALITY   600
  Print COLOR black

  --- Job Processing Options 
  PAGE NUMBER where printing should begin[1]
  Print file TYPE a
  Pre-processing FILTER NAME []
  INITIALIZE printer? no initialization
  RESTORE printer?yes

  --- Text Formatting Options ---
  TOP MARGIN (lines) [0]
  BOTTOM MARGIN (lines)  [0]
  Number of columns to INDENT[0]
  WRAP long lines?no
  Add LINE FEED or CARRIAGE RETURNLF-CRLF VT-CRVT
* CODE PAGE of print file[IBM-850]
  TITLE STRING for 'pr' filter   []
  LINES per page [0]
  COLUMNS per page   [2]

  - Paper/Page Options --
  Page ORIENTATIONportrait
  Input PAPER SOURCE  tray 2
  PAPER SIZE override for input paper source  letter
  DUPLEX output   simplex
(single-sided
  OUTPUT BIN destination  printer top bin

  - Header/Trailer Page Options -
  SEPARATOR PAGES none
  HOSTNAME for PRINTED AT: on HEADER PAGE  []

  - Messages/Diagnostics 
  DIAGNOSTIC LEVEL(normal) - print
job;
[BOTTOM]

Please note that the item's I've marked with the * need to match your
printer.  I believe that the critical settings are Print File TYPE (a =
ascii), WRAP long line?, and COLUMNS per page.

Hope this helps.

--Tom Pellitieri
  Century Equipment
  Toledo, Ohio
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] PCL5/6 Universe / AIX printer setup question

2004-11-16 Thread TPellitieri
Lee Bacall wrote:

 I've been struggling to find a solution to get a complex PCL
 string from UniVerse on AIX to the printer without stripping
 out some of the escape sequences. (The print routine works
 just fine on other systems - it's not a PCL question)

I have found that AIX gets flaky with some characters, depending on the PCL
command.  I had to put some things into macros to get them to print
properly, and as previously mentioned, I recommend using the passthrough
setting for the form queue.

You might find the following PCL Debug commands helpful:

^027s0C - Enable End of Line Wrapping
^027Y- Enable Display Functions Mode
^027Z- Disable Display Functions Mode

The ^027Y will display all characters received instead of executing the
PCL.  The first command allows overlong commands to wrap on the printer.  I
consider this the last ditch debug to figure out if the data I expect is
actually reaching the printer.  I suggest trimming PCL to the essential
problem areas, if possible.

Hope this helps.

--Tom Pellitieri
  Century Equipment
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Printing an RTF file from Universe

2004-11-11 Thread TPellitieri
Brian Parker [EMAIL PROTECTED] wrote on Wed, 10 Nov 2004 11:24:46 -0500

 I know that if I imbed HP PCL code into the print job for different
 fonts etc that these will print fine. However, for this particular
 job, a couple of logos are part of the document as well and we would
 like to be able to print them.

It is possible to print logos directly from UniVerse/UniData using PCL
coding - it's not very straightforward, however.  I developed code here to
print our corporate logo on all checks and invoices.  We use UniData 5.2 on
AIX 5.1, but I needed a PC to format the logo originally.  Here's an
outline of the procedure.

On the PC, I saved the logo as a Monochrome Bitmap, since it's the easiest
format to convert to raster data.  I transferred that file to the AIX
system and extracted the raster data.  I converted the data to a UniData
item that could be stored, and use a MATREAD to retrieve it.  My BASIC code
uses PCL Macros and Raster Graphics to output the logo.  I then execute the
macro as needed.  This is very efficient on multiple document runs, like
our checks and monthly statements, since the logo is sent to the printer
once, and a six-character PCL command reprints it.

There are a few glitches.  Between the multi-value delimiters and some of
the printer processing, I had to break the image up and send it in two
passes.  The first pass prints the left four bits of each byte, and the
second pass prints the right four bits.  This way I avoid sending values
that are reinterpreted by the printer.  I had to use macros for the same
reason.

(Hmm.. this looks like a good topic for a newsletter article...)

--Tom Pellitieri
  Century Equipment
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] [UD] Exit BASIC program with SELECT list?

2004-10-27 Thread TPellitieri
On 26 Oct 2004 13:26:22 -0700, Allen Egerton wrote:
 Why wouldn't you use the REMOVE statement?

On 26 Oct 2004 16:33:55 -0700, Allen E. Elwood wrote:
 Ohh.lemme see, could it be that I've never heard of REMOVE?

A caution with REMOVE - It removes up to the next DELIMITER, so if you have
value marks or lower delimiters in your data, you won't skip an entire
attribute.  Full UniData syntax is

REMOVE var FROM dyn.var [AT col.pos] SETTING delim.code

delim.code returns the delimiter:  0=End, 1=Record Mark, 2=Attribute Mark,
etc.

I found the following works rather well, and returns full attributes
without extra coding:

SELECT DYM.ARRAY TO LIST.VAR
LOOP WHILE READNEXT ATTR FROM LIST.VAR DO
   process ATTR
REPEAT

Also, when building a list, I found on our system that using

NEW.LIST = NEW.LIST:@AM:NEW.VAL

works faster than the -1 construct.

Your mileage may vary.

--Tom Pellitieri
  Century Equipment
  Toledo, Ohio
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UD] running a subroutine

2004-10-22 Thread TPellitieri
 Date: Fri, 22 Oct 2004 09:12:12 -0400
 From: Mark Johnson [EMAIL PROTECTED]

 I still maintain my opinion of most of these stupid' test programs
because
 many of them look like this:

 001 PROMPT '
 002 INPUT ANS
 003 PRINT OCONV(ANS,MD2,$Z)
 004 END
 and another one looks like this
 001 PROMPT 
 002 INPUT ANS
 003 PRINT OCONV(ANS,DMA)
 004 END

So...create more intelligent test programs -- Data driven software is a
wonderful thing!  I wrote this one (OCONV.TEST) to do just the sort of
things you've noted above:

001 PROMPT 
002 LOOP
003PRINT Test Format: :
004INPUT TEST.FORMAT
005 WHILE TEST.FORMAT #  DO
006LOOP
007   PRINT Input Value: :
008   INPUT TEST.VAL
009WHILE TEST.VAL #  DO
010   PRINT Converted:  *:OCONV(TEST.VAL,TEST.FORMAT):*
011REPEAT
012 REPEAT
013 END

I agree with others who have suggested setting up a separate file for
testing...I often wish I had done so :-  Someday, in my copious free time,
I'll clean up my old program file...

--Tom Pellitieri
  Century Equipment
  Toledo, Ohio
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UD] BASIC COMPILE ERROR: Too many constants near line

2004-10-14 Thread TPellitieri
 Date: Thu, 14 Oct 2004 09:49:24 +1000
 From: Craig Bennett [EMAIL PROTECTED]

  Cant it be read ONCE and put into one (or more) named common
  variables?

 I could do that, but I am trying to have the data cached by
 a process (object loaded) without having to read the data.

I don't remember if you've said what O/S you're using, but I have a font
load coded with a PCPERFORM to have our AIX system send the font
definitions to the printer before starting printing from BASIC.

The file contains the exact data stream needed to set up the font.  I use
the following BASIC statement in UniData to send it:

* QUEUE = AIX Print Queue
* FONTFILE = Full Path Name of Font File, e.g. /usr/local/myfont
*
  PCPERFORM lp -d :QUEUE: :FONTFILE CAPTURING MSG

Hope this might help...

--Tom Pellitieri
  Century Equipment
  Toledo, Ohio
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Fancy Printer

2004-10-06 Thread TPellitieri
 Date: Wed, 6 Oct 2004 01:56:37 -0400
 From: Mark Johnson [EMAIL PROTECTED]
 Subject: [U2] Fancy Printer
 ...
 Second, sort of for D3. Are there any repetitive printer strings that
could be
 send to the printer that precedes the actual output for each hold file.
I'm
 dancing with a few clients having medium HP printers and the same report
comes
 out landscape or portrait depending on the previous output (pick or word
 documents etc). I would like to either precede the output with an ESC E
to
 clear to the defaults or actually force the default continuously.

Are you using D3 from Windows or some *nix variant?  When we first added
our printers to the Windows network (we previously had them only attached
to the AIX system) we had to do a few things.  The easiest was to have AIX
Defaults set to no initialization and restore printer.  This let AIX
reset the printer after each job, as Windows seemed to be doing this as
well.

If you have strictly Windows printers, I would make certain they include an
Esc-E at the end of each job.  Sorry I can't give you specifics, but this
would leave the printer at default settings, and the next job would have to
change what it needed.

--Tom Pellitieri
  Century Equipment
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Unidata with AccuTerm?

2004-09-02 Thread TPellitieri
 Date: Wed, 1 Sep 2004 20:10:16 -0700
 From: Tony Gravagno [EMAIL PROTECTED]

 Are there any other settings in AccuTerm that should or should
 not be set for best results?

Can't speak specifically for your situation, but...

I use AccuTerm 97 with SystemBuilder 5.2.4 and UniData 5.2 on AIX 5.1.
This connects using either a telnet session or a direct serial connection.

My terminal type is set in AIX to Wyse60 emulation (using the .profile
command export TERM=wy60), and in the AccuTerm Settings for Keyboard, I
have the following overrides:

Keypad:
Del  - ^[W
Left - ^F

Shift Keypad:
PgUp - ^T
PgDn - ^B
Left - ^V
Right- ^N
Down - ^O

Don't know if any of this will help or not...

--Tom Pellitieri
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] [UV] Anti-virus recommendations for Universe on Windows?

2004-08-26 Thread TPellitieri
 Date: Wed, 25 Aug 2004 09:51:36 -0700
 From: David Scoggins [EMAIL PROTECTED]
 ...
 We now are considering installing McAfee AV on the Universe
 servers anyway in light of this event.  Does anyone have any
 recommendations regarding how to eliminate the McAfee/UV
 conflict, or is there a better alternative - e.g. Symantec/Norton,
 AVG, F-Prot, etc?

Consider looking at Sophos (http://www.sophos.com).  You can download an
evaluation version from their website, although you do have to register to
get it.

I don't use U2 on Windows, but I know that Sophos takes a very
non-intrusive approach and does not affect system performance as much as
Norton.  The on access scanner keeps track of clean files, so it only
scans files that have changed.

--Tom Pellitieri
  Century Equipment
  Toledo, Ohio
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] UNIDATA - SAVING UNIQUE and LIST.ALGEBRA

2004-08-24 Thread TPellitieri
 Date: 23 Aug 2004 16:26:54 -0300
 From: Philippe Parent [EMAIL PROTECTED]
 ...
 (where 'y' is the value marker)

 Why is there y1y1, y2y1, y3y1 appended at the end of
 each ID?  I'm guessing it has to do with the saving
 unique feature or something?
 ...
 So first, what is the extraneous information at the end
 of each ID in the SAVEDLISTS?  ...

The extra data is the attribute and value marks where the values were
extracted.  You can easily eliminate them by doing an EDIT-LIST (AE) and
use the commands BD9/^253 followed by a C9/^253//

If the data you're collecting are record IDs in a file, you can also select
that file to get rid of the extra data.

I suppose there's a good reason to keep the source info, but I wish there
was a UDT.OPTION to turn it off...

--Tom Pellitieri
  Century Equipment
  Toledo, OH
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] merge sort

2004-07-27 Thread TPellitieri
Chuck,

I agree with Stuart - using a work file would speed things up.
Here's a quick code outline to help (I use UniData, and haven't
tried to run this, so YMMV):

OPEN MYFILE TO F.MYFILE ELSE STOP
OPEN WORKFILE TO F.WORK ELSE STOP
EXECUTE CLEARFILE DATA WORKFILE
READ REC FROM F.MYFILE,MYREC ELSE STOP
TMP = 
SELECT REC TO TMP
WORK.ID = 0
LOOP WHILE READNEXT RECITEM FROM TMP DO
   WORKREC = RAISE(RECITEM)
   WORK.ID += 1
   WRITE WORKREC ON F.WORK,WORK.ID
REPEAT
EXECUTE SSELECT WORKFILE BY F5 BY @ID
NEWREC = 
LOOP WHILE READNEXT WORK.ID DO
   READ WORKREC FROM F.WORK,WORK.ID THEN
  TMP = LOWER(WORKREC)
  IF NEWREC =  THEN NEWREC = TMP1 ELSE NEWREC := @AM:TMP1
   END
REPEAT
WRITE NEWREC ON F.MYFILE,SORTED.MYREC

--Tom Pellitieri

 Date: Tue, 27 Jul 2004 15:05:59 +1000
 From: Stuart Boydell [EMAIL PROTECTED]

 I did some speed tests awhile ago and dumping the data to a work
 file and sorting it there worked a treat even though nix shell
 was marginally faster.
 Maintenance was trumps though.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Chuck Mongiovi
 Sent: Monday, 26 July 2004 23:04

 For example (] is an @VM)

 REC1 = A]B]C]D]15
 REC2 = A]B]C]D]25
 REC3 = A]B]C]D]100
 REC4 = A]B]C]D]11

 I want to sort by multi-value #5 .. The sorting isn't the issue..
 It's when DCOUNT(REC,@AM) gets large that the whole process gets
 extremely slow .. I can't do something like MATPARSE, because I
 can't predict *HOW* big REC will get ..
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/