Re: Memo: RE: [UD] Union Query

2004-04-30 Thread Allen Egerton

From: Burwell, Edward [EMAIL PROTECTED]
To: 'U2 Users Discussion List' [EMAIL PROTECTED]
Sent: Friday, April 30, 2004 1:41 PM
Subject: RE: Memo: RE: [UD] Union Query


 R. Bruce,
 
 Could you give an example?  I'm having trouble envisioning this.  
 
 Let's say I have these keys in a list:
 
 LOCAL.1
 LOCAL.2
 LOCAL.3
 OTHER.1
 OTHER.2
 OTHER.3
 
 The first 3 live in FILEA and the last 3 live in FILEB
 
 If I go a GET-LIST, then enter:
 
 LIST FILEA NAME
 
 What would the NAME dictionary look like?

Based on what he said, I'd guess something like this:

0 NAME
1 I
2 TRANS(FILEA, @ID, NAME, ): TRANS(FILEB, @ID, NAME, )

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


Re: Memo: RE: [UD] Union Query

2004-04-30 Thread Allen Egerton

From: Burwell, Edward [EMAIL PROTECTED]
To: 'U2 Users Discussion List' [EMAIL PROTECTED]
Sent: Friday, April 30, 2004 2:00 PM
Subject: RE: Memo: RE: [UD] Union Query


 Does that work for you?  It doesn't work for me.

 ORDER.FILE NAME.

 114061 C.M.O.S. INC. *ASC*
 114062 AMERICAN PERFIT XSTAL
 18 TIMELAND COMPANY
 19 MCCANN ELECTRONICS *STR*
 130395 TERMINAL TECH SERVICE
 138562 TOWN VISION ELECTRONICS
 154897 CASIO SERV CENTER *ASC*
 163063 CASIO SERV CENTER *ASC*
 171230 AMERICAN PERFIT XSTAL
 195731 ELECT MUSIC INSTR *FAS*
 10 records listed
 Enter CR to print non exist record ids
 007890
 007891
 007892
 007893
 007894
 016057
 016058
 016059
 016060
 016061

 Here is the dict:

 001: I
 002: TRANS(ORDER.FILE,@ID,3,):TRANS(ORDER.FILE.CAN,@ID,3,)
 003:
 004: NAME
 005: 25L
 006: S


I can't test it right now, I don't have access to a Universe machine until
tonight.   Try an ID.SUP, 'cause the ids for ORDER.FILE.CAN certainly aren't
in ORDER.FILE.

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


Re: WEOFSEQ

2004-04-14 Thread Allen Egerton
From: Shawn Waldie [EMAIL PROTECTED]
Sent: Wednesday, April 14, 2004 1:48 PM


 I need some clarification.

 Given the following:

 X.DIR   = X.HOME.WALDIES; * the VOC item 'X.HOME.WALDIES' is a
 pointer to /home/waldies
 X.FILE  = SRW_TEST_SEQ.txt

 OPENSEQ X.DIR,X.FILE TO FV.SEQ THEN
   WEOFSEQ FV.SEQ
 ELSE
   ...
 END


 Upon a successful open of X.DIR at X.FILE, will the WEOFSEQ erase
 everything in X.DIR starting with X.FILE, including other files that may
 exist under - positionally - X.FILE?  Or is it just suppose to clear
 anything that might be contained in X.FILE?
snip

You *didn't* open X.DIR.  You opened sequentiall X.FILE within X.DIR onto
filepointer FV.SEQ.

As a sidenote, all actions that you take using FV.SEQ must be sequential
actions such as WRITESEQ, WEOFSEQ, CLOSESEQ.  I'm not sure what would happen
if you used a normal WRITE or CLOSE statement on that filepointer, I hope
and suspect the program would bomb.

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


Re: BETWEEN in a CASE structure

2004-04-08 Thread Allen Egerton
From: [EMAIL PROTECTED]


 Jason,

 Unless UniData 6.0 supports a 'BETWEEN' relational operator, I recommend
to you to use the second scenario, Case (val = 6000 AND val = 6009).
I'm using UniData 5.1 and 'BETWEEN' in not a valid relational operator in
UniBasic.  UniQuery, yes...



You could check the code generated, but I tend to write a statement using
just the greater_than operator, rather than the greater_than_or_equal_to,
feeling that the number of actual operations is less.  I also tend to use
the explicitly test operators rather than those which can be test or
assignment, but that's just style and open for debate.  So, I'd use:
CASE ((VAL GT 5999) AND (VAL LT 6010))

Rgds.

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


Re: VOC prompt issue?

2004-04-06 Thread Allen Egerton
From: Karl L Pearson [EMAIL PROTECTED]



 I have this VOC item we run:

 ED VOC BIN.LOC
 7 lines long.

 : P
 0001: PA
 0002: CLEARDATA
 0003: CLEARSELECT
 0004: SELECT INVMST WITH F12 = ENTER BIN LOCATION TO LIST ITEMS FOR:
 
 0005: SELECT INVMST WITH WAREHOUSE = 1 REQUIRE.SELECT
 0006: SELECT INVMST WITH F12 # '' REQUIRE.SELECT
 0007: LIST INVMST BY F04 BY ITEM F04 F12 ITEM F13 F14 F28 T48 DOLR DOLS
 ID.SUP LPTR DBL-SPC HEADING SPECIAL FOR CHRISTINE...ALL ITEMS IN A
 SPECIFIC BIN LOCATION   'T'   PAGE 'P' REQUIRE.SELECT
 Bottom at line 7.

 When it's run multiple times, the second time re-prints the first run
 without prompting for a new bin location. Logging off, which I suspect
 clears something or other, allows the person to run it on a second item.

 Any thoughts?


Sure.  Try this:

003.5: * ENTER BIN LOCATION TO LIST ITEMS FOR
0004: SELECT INVMST WITH F12 = ENTER BIN LOCATION TO LIST ITEMS FOR: 

I'm not on a UV machine right now, so I can't check the syntax.  I don't
think you need the quotes you originally had in line 4, but I'm not 100%
certain.

On the newly inserted line, make sure there's a space between the asterisk
and the Less_Than sign, otherwise the interpreter will think it's a globally
cataloged routine.

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


Re: Running Total- @1?

2004-04-02 Thread Allen Egerton
On Fri, 2 Apr 2004 14:54:14 -0800 , you wrote:

LIST CUST EVAL @1+1 CUST.NAME

Well OK, I'll 'fess up to being clueless... what is @1? Why does this work?
(running UV 9.6.1.3). What other @ variables are left out of my docs?

The most common use I've  found for @1, @2, etc are within very
complex I-Types, where statements are separated by semi-colons.  @1
refers to the determined value of the first statement, @2 to the
second, etc.

What follows is an off the cuff example, meant merely to demonstrate
the concept...

0 TAXABLE.YN
1 I
2 IF (STATE EQ CT MA RI) THEN 10 ELSE 0; IF (JOB.CODE EQ 12)
THEN 0 ELSE @1; IF (@2 GT 0) THEN Y ELSE N

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


Re: Running total

2004-04-01 Thread Allen Egerton
On Thu, 1 Apr 2004 17:08:02 -0500, you wrote:

Is there a way in UniQuery to create a virtual attribute that will print
a running total of the number of items listed? For example:

 

LIST  CUST  RUNNING_TOTAL  CUST.NAME

 

ID RunningCustomer

Total Name...

111   1  Joe Jones

112   2  Sue Smith

223   3  Sally White

In Universe, add a DICT item with the following fields:
0 LINE.NBR
1 I
2 @1 + 1
3 MD0
4
5 6R

Then LIST CUST LINE.NBR CUST.NAME  

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


Re: U2UG Contract

2004-03-29 Thread Allen Egerton
On Mon, 29 Mar 2004 19:38:07 +1000, Rainer Gromansperg wrote:

snip

As a relative new list-user could you please let us know what 'cdp' is?

Newsgroup:  Comp.Databases.Pick

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


Re: COMMON Variable.

2004-03-29 Thread Allen Egerton
From: Carolina Lizama [EMAIL PROTECTED]

 Is there a way to pass some common variable to a Phantom program - which
 will be called using EXECUTE 'PHANTOM '.

 I've even tried named COMMON and it lost its value.

Common exists on a per-user basis.  So, if your phantom initializes it, it
can use it.  But there's no way to pass values stored in common from one
user to another user.

In other languages, you can do it via shared memory, but to the best of my
knowledge, that's not available in Universe/Unidata at the application
level.  Obviously it exists at the OS and DB level, otherwise LIST.READU and
its brethren would be pretty useless :)

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


Re: SETPTR for sending to file

2004-03-23 Thread Allen Egerton
From: Cyndi Calvin [EMAIL PROTECTED]
(responding to Jeff)

 LPTR!!!   Thanks.  That was what was missing.  Works like a charm.
 THANK YOU

Now for lesson two in SETPTR.  The first parameter is a printer unit which
defaults to zero.  So, a not uncommon thing to do is to issue multiple
setptr commands, then direct output to them appropriately.

One example might be:
SETPTR 0,132,2,0,0,3,BANNER MYFILE,BRIEF
SETPTR 1,132,2,0,0,3,BANNER MYFILE.NARROW,BRIEF
SETPTR 2,85,2,0,0,3,BANNER MYFILE.VERY.NARROW,BRIEF

SELECT VOC SAMPLE 50
LIST VOC F1 F2 F3 F4 F5 LPTR

SELECT VOC SAMPLE 50
LIST VOC F1 F2 F3 LPTR 1

SELECT VOC SAMPLE 50
LIST VOC F1 LPTR 2

Those are all MODE 3, which writes to the HOLD file.  More appropriately,
you might use the default MODE which spools, and use different AT's or
DEST's within your SETPTR statements.  I've seen people define their printer
destinations using multiple SETPTR statements in their VOC LOGIN paragraphs.
That way they can simply LIST anyfile LPTR 1 and it'll show up on a
particular printer, or LIST anyfile LPTR 2 and have it show up elsewhere.

The same logic can be used within BASIC programs where you need to create
multiple output files simultaneously.  Perhaps for an AP run where you're
printing checks and a register.  In that case you'd specify the UNIT in the
SETPTR, the PRINT and the CLOSE statements.  Defaults for all are zero, but
they're all specifiable.

Rgds.

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


Re: [UV] Ever wondered how something works...

2004-03-04 Thread Allen Egerton
On Thu, 4 Mar 2004 13:53:31 +1100 , David Hona wrote:

snip
PERFORM prompt (TCL). I believe field 3 PR indicated a PRIMOS command
under PI.
snip

Actually, if I remember correctly, the PR was short for PRIMITIVE.

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


Re: Hashing Algorithm

2004-02-13 Thread Allen Egerton
From: Karjala Koponen [EMAIL PROTECTED]



 Would knowing the algorithms allow you to write a program that would
accept parameters about your file, or  even walk the file, to determine
which file type would be best for that file?

Years ago I wrote a FTN program that analyzed PR1ME INFORMATION files and
recommended file types and modulos.  Problem with it was that it required a
reasonably in-depth understanding of the data structures, and they changed
in some releases.

When HASH.HELP became robust enough I quit using my program as I couldn't
justify the development time/effort.  Instead I wrote a front-end which
generated paragraphs consisting primarily of HASH.HELP %filename%
statements.  The paragraphs included COMO statements, and the final
statement ran a program to interpret the output from the HASH.HELP and
execute an appropriate RESIZE command.


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