RE: [U2] Help with File Pointers

2007-03-13 Thread brian
Oh and one more thing came to mind.

Windows still supports the old DOS SUBST command.

Brian

Susan Joslyn wrote:
 On help with file pointers thanks to everyone who has
pitched in. 
 So far I'm no joy.
 FILEINFO doesn't return just a hard path.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Help with File Pointers

2007-03-13 Thread [EMAIL PROTECTED]
Susan Joslyn wrote:
 On help with file pointers thanks to everyone who has
pitched in. 
 So far I'm no joy.
 FILEINFO doesn't return just a hard path.
 STATUS doesn't seem to return anything.
 Ls -I might do the trick on UNIX but I need a Windows
solution, too
 (and first).
 
 I think I can do the peel back/parsing thing.  Was hoping
not to have
 to do that.

As far as parsing is concerned, you just need to realise
that every 'abc\..\' can just be removed.  I'd run the
FILEINFO, then convert '/\' to @FM:@FM in the result and
then walk the resulting dynamic array.  Everytime you hit a
'..' you can back up one, delete two attributes and resume
your walk from where you are.

As to the ls -i idea on UNIX to sort out sym links, a better
bet would be to start with FILEINFO as before, hack off the
last bit of the path - the file - and then execute '(cd
THE_PATH_BIT; /usr/bin/pwd)' and capture the output which
will be the real path.  Make sure to use a standalone pwd
program though, not the shell built-in.

Of course, the real nasty is that on Windows there is a sym
link concept called a junction that does the same thing, and
I can't think of a way to resolve that.  Luckily very few
people use them (there's a tool at sysinternals.com for
creating, querying and deleting them).

Cheers,

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


[U2] Error in report generation.

2007-03-13 Thread Sanjeebkumar Sarangi
Hi
I tried to generate a report by writing a small program. But I got an error
as below.

ERROR:

RUN TEST.BP MAIN
MAIN

45 record(s) selected to SELECT list #0.
Program SUB: Line 3, Variable REC previously undefined.  Empty string
used.
Program SUB: Line 3, Printer name UVDEFAULT is not recognized by the
system.

CODE:

ED TEST.BP
Record name = MAIN
15 lines long.

: P
0001: CRT 'MAIN'
0002: OPEN 'INVENTORY.T' TO INEVNTORY ELSE STOP
0003: SENT = 'SSELECT INVENTORY.T BY ITEM_CODE'
0004: EXECUTE SENT
0005: EOF = 0
0006: LOOP
0007: READNEXT ITEM_CODE ELSE
0008: EOF = 1
0009: END
0010: UNTIL EOF DO
0011: READ  REC FROM INEVNTORY ,ITEM_CODE THEN
0012: CALL SUB
0013: END
0014: REPEAT
0015: STOP
Bottom at line 15.
: Q

File name= TEST.BP
Record name = SUB
6 lines long.

: P
0001:CRT 'SUB'
0002: PRINTER ON
0003: PRINT ITEM_CODE  L#16:REC1
0004: PRINT DESCRIPTION  L#16: REC2
0005: PRINT TYPE  L#16:REC3
0006: PRINTER OFF
0007: RETURN
Bottom at line 7.
:
How do I resolve this?


Thanks
Sanjeeb
=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Error in report generation.

2007-03-13 Thread Vance E Alspach (JL - SFD)
Shouldn't SUB have SUBROUTINE and arguments (REC) on line 1?

 

Vance Alspach

J  L Industrial Supply

An MSC Company

 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sanjeebkumar
Sarangi
Sent: Tuesday, March 13, 2007 7:40 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] Error in report generation.

 

Hi

I tried to generate a report by writing a small program. But I got an error

as below.

 

ERROR:

 

RUN TEST.BP MAIN

MAIN

 

45 record(s) selected to SELECT list #0.

Program SUB: Line 3, Variable REC previously undefined.  Empty string

used.

Program SUB: Line 3, Printer name UVDEFAULT is not recognized by the

system.

 

CODE:

 

ED TEST.BP

Record name = MAIN

15 lines long.

 

: P

0001: CRT 'MAIN'

0002: OPEN 'INVENTORY.T' TO INEVNTORY ELSE STOP

0003: SENT = 'SSELECT INVENTORY.T BY ITEM_CODE'

0004: EXECUTE SENT

0005: EOF = 0

0006: LOOP

0007: READNEXT ITEM_CODE ELSE

0008: EOF = 1

0009: END

0010: UNTIL EOF DO

0011: READ  REC FROM INEVNTORY ,ITEM_CODE THEN

0012: CALL SUB

0013: END

0014: REPEAT

0015: STOP

Bottom at line 15.

: Q

 

File name= TEST.BP

Record name = SUB

6 lines long.

 

: P

0001:CRT 'SUB'

0002: PRINTER ON

0003: PRINT ITEM_CODE  L#16:REC1

0004: PRINT DESCRIPTION  L#16: REC2

0005: PRINT TYPE  L#16:REC3

0006: PRINTER OFF

0007: RETURN

Bottom at line 7.

:

How do I resolve this?

 

 

Thanks

Sanjeeb

This e-mail is intended for the use of the addressee(s) only and may contain
privileged, confidential, or proprietary information that is exempt from
disclosure under law. If you are not the intended recipient, please do not
read, copy, use or disclose the contents of this communication to others.
Please notify the sender that you have received this e-mail in error by
replying to the e-mail. Please then delete the e-mail and destroy any copies
of it. Thank you.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Error in report generation.

2007-03-13 Thread Mats Carlid

Perhaps a little explanation is in order here.

There are no global variables in u2.
Thus the need to pass the variables to the subroutine.

If you have truly global variables - used in many subroutines - you could
put them in a common block.
(  add a line
  COMMON  /name/  REC, VAR
  in every program that use them )


If the program stays as simple (small)  as it is now a gosub is neater 
than an external

routine:

   ...
  read  x from y else null
 gosub sub
 ...

 sub:
print ...
return

...
end


hth
--  mats


Hi

You need to pass  REC as a parameter to the subroutine see below:
-- mats

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


Re: *** GMX Spamverdacht *** [U2] Error in report generation.

2007-03-13 Thread Mecki Förthmann

Hi Sanjeebkumar,

you have to pass variables from the calling program to the subroutine, 
otherwise they will not be defined in the subroutine.

Line 12 in your calling program (MAIN) should therefore look like this:
CALL SUB(REC)
and line 1 in your subroutine (SUB) should be
SUBROUTINE SUB(REC) - The SUBROUTINE statement should always be the 
first line in every program, that is likely to be called.
You may pass multiple variables i.e. CALL SUB(VAR1,VAR2,...) whereby the 
variable names can be different in calling and called program - i.e. 
SUBROUTINE SUB(A,B,...) - In this case A will contain the value of VAR1, 
B the value of VAR2 and so on. Important is, that the number of passed 
variables has to be the same in calling and called programs!



You can also pass variables using COMMON, but I don't want to get into 
that, since you seem to be a real newbie, and I don't want to confuse 
you. In the MV-world there is usually always more than one solution.
I also suggest to write the PRINTER ON (before the LOOP statement) and 
PRINTER OFF (after the REPEAT statement) statements in your calling 
program (MAIN), since you create a lot of overhead otherwise.


Sorry, but with the second error message, I cannot help you - I've never 
encountered this one.

Maybe you haven't set up a valid printer on your system?

I hope that helps you at least a bit

Mecki Foerthmann

Sanjeebkumar Sarangi wrote:

Hi
I tried to generate a report by writing a small program. But I got an error
as below.

ERROR:

  

RUN TEST.BP MAIN


MAIN

45 record(s) selected to SELECT list #0.
Program SUB: Line 3, Variable REC previously undefined.  Empty string
used.
Program SUB: Line 3, Printer name UVDEFAULT is not recognized by the
system.

CODE:

  

ED TEST.BP


Record name = MAIN
15 lines long.

: P
0001: CRT 'MAIN'
0002: OPEN 'INVENTORY.T' TO INEVNTORY ELSE STOP
0003: SENT = 'SSELECT INVENTORY.T BY ITEM_CODE'
0004: EXECUTE SENT
0005: EOF = 0
0006: LOOP
0007: READNEXT ITEM_CODE ELSE
0008: EOF = 1
0009: END
0010: UNTIL EOF DO
0011: READ  REC FROM INEVNTORY ,ITEM_CODE THEN
0012: CALL SUB
0013: END
0014: REPEAT
0015: STOP
Bottom at line 15.
: Q

File name= TEST.BP
Record name = SUB
6 lines long.

: P
0001:CRT 'SUB'
0002: PRINTER ON
0003: PRINT ITEM_CODE  L#16:REC1
0004: PRINT DESCRIPTION  L#16: REC2
0005: PRINT TYPE  L#16:REC3
0006: PRINTER OFF
0007: RETURN
Bottom at line 7.
:
How do I resolve this?


Thanks
Sanjeeb
=-=-=
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you

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

  




___ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

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


Re: [U2] Error in report generation.

2007-03-13 Thread Mats Carlid
Hi

You need to pass  REC as a parameter to the subroutine see below:
-- mats

Sanjeebkumar Sarangi skrev:
 Hi
 I tried to generate a report by writing a small program. But I got an error
 as below.

 ERROR:

   
 RUN TEST.BP MAIN
 
 MAIN

 45 record(s) selected to SELECT list #0.
 Program SUB: Line 3, Variable REC previously undefined.  Empty string
 used.
 Program SUB: Line 3, Printer name UVDEFAULT is not recognized by the
 system.

 CODE:

   
 ED TEST.BP
 
 Record name = MAIN
 15 lines long.

 : P
 0001: CRT 'MAIN'
 0002: OPEN 'INVENTORY.T' TO INEVNTORY ELSE STOP
 0003: SENT = 'SSELECT INVENTORY.T BY ITEM_CODE'
 0004: EXECUTE SENT
 0005: EOF = 0
 0006: LOOP
 0007: READNEXT ITEM_CODE ELSE
 0008: EOF = 1
 0009: END
 0010: UNTIL EOF DO
 0011: READ  REC FROM INEVNTORY ,ITEM_CODE THEN
 0012: CALL SUB(REC);!!
   
 0013: END
 0014: REPEAT
 0015: STOP
 Bottom at line 15.
 : Q

 File name= TEST.BP
 Record name = SUB
 6 lines long.

 : P
   
   SUBROUTINE SUB(REC) ;!!!
 0001:CRT 'SUB'
 0002: PRINTER ON
 0003: PRINT ITEM_CODE  L#16:REC1
 0004: PRINT DESCRIPTION  L#16: REC2
 0005: PRINT TYPE  L#16:REC3
 0006: PRINTER OFF
 0007: RETURN
 Bottom at line 7.
 :
 How do I resolve this?


 Thanks
 Sanjeeb
 =-=-=
 Notice: The information contained in this e-mail
 message and/or attachments to it may contain 
 confidential or privileged information. If you are 
 not the intended recipient, any dissemination, use, 
 review, distribution, printing or copying of the 
 information contained in this e-mail message 
 and/or attachments to it are strictly prohibited. If 
 you have received this communication in error, 
 please notify us by reply e-mail or telephone and 
 immediately and permanently delete the message 
 and any attachments. Thank you
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Error in report generation.

2007-03-13 Thread Allen Egerton

Charles Barouch wrote:

Sanjeeb,
There are several problems with this and I strongly suggest you get 
some training. [AD] My company, Key Ally, does training[/AD].
However, in brief: Variables are only global within a program. Once 
you CALL SUB, you are in a new program and all variables in it are 
inherently unrelated to the variables in the calling program. To connect 
them you either need to use COMMON or to pass them. For example: if line 
12 of MAIN said CALL SUB(REC) *and* SUB started with SUBROUTINE 
SUB(REC), then REC in MAIN and REC in SUB would be linked.


All of the above is correct, but there is another approach, (yeah, this 
is pick/u2/multi-value, there's *always* another approach.


See modified line 12, and then lines 16 through 27.  If you embed the 
code, you don't have to pass the variables, plus you don't have the 
overhead of calling another external routine.


If you're going to re-use the code, then you probably want to code it as 
an external, in which case you need to pass it arguments as Charles 
said, if it's only for this routine, then you probably want to code it 
internally.



0001: CRT 'MAIN'
0002: OPEN 'INVENTORY.T' TO INEVNTORY ELSE STOP
0003: SENT = 'SSELECT INVENTORY.T BY ITEM_CODE'
0004: EXECUTE SENT
0005: EOF = 0
0006: LOOP
0007: READNEXT ITEM_CODE ELSE
0008: EOF = 1
0009: END
0010: UNTIL EOF DO
0011: READ  REC FROM INEVNTORY ,ITEM_CODE THEN
0012: GOSUB PRINT.LINE:
0013: END
0014: REPEAT
0015: STOP

0016: *
0017: PRINT.LINE:   ;*  Internal subroutine.
0018: CRT 'SUB'
0019: PRINTER ON
0020: PRINT ITEM_CODE  L#16:REC1
0021: PRINT DESCRIPTION  L#16: REC2
0022: PRINT TYPE  L#16:REC3
0023: PRINTER OFF
0024: RETURN
0025: *  End of PRINT.LINE internal subroutine.
0026:
0027: END;*  For compiler.



--
Allen Egerton
aegerton at pobox dot com
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Error in report generation.

2007-03-13 Thread Jeff Schasny

This wont work either:

L#16:REC1

Try this:

REC1 L#16

Sanjeebkumar Sarangi wrote:

Hi
I tried to generate a report by writing a small program. But I got an error
as below.

ERROR:

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


Re: Spam:[U2] RE: U2 Users Digest V1 #1538

2007-03-13 Thread Jerry
The STATUS statements returns a dynamic array of various values. here is an 
example of it's use. The two file pointers are:

(04) ED VOC CLNT.STATS.TEST
3 lines long.

: P
0001: Q
0002: AAC.ARCH
0003: CLNT.STATS.HIST.0701
Bottom at line 3.
and
TESTAACED VOC CLNT.STATS.HIST.0701
3 lines long.

: P
0001: F
0002: /data1/AAC.ARCH/CLNT.STATS.HIST.0701
0003: D_CLNT.STATS
Bottom at line 3.
The little program I am using is:

TESTAACED JPB.BP TEST
12 lines long.

: P
0001:   OPEN 'CLNT.STATS.HIST.0701' TO CLNT.STATS.HIST.FILE ELSE STOP
0002:   OPEN 'CLNT.STATS.TEST' TO CLNT.STATS.TEST.FILE ELSE STOP
0003:   STATUS S.ARRAY FROM CLNT.STATS.HIST.FILE THEN
0004:  CRT S.ARRAY10
0005:  CRT S.ARRAY20
0006:   END
0007:   STATUS S.ARRAY FROM CLNT.STATS.TEST.FILE THEN
0008:  CRT S.ARRAY10
0009:  CRT S.ARRAY20
0010:   END
0011:   RETURN
0012:END
Bottom at line 12.
and here are the results:
TESTAACTEST
159107
/data1/AAC.ARCH/CLNT.STATS.HIST.0701
159107
/data1/AAC.ARCH/CLNT.STATS.HIST.0701
Field 10 is the inode number field 20 is the actual path even though one of 
the voc pointers is a q-pointer it still returns the entire path. This was 
done on a Solaris system running UV 10.1.12.



- Original Message - 
From: Susan Joslyn [EMAIL PROTECTED]

To: u2-users@listserver.u2ug.org
Sent: Monday, March 12, 2007 5:21 PM
Subject: Spam:[U2] RE: U2 Users Digest V1 #1538



STATUS doesn't seem to return anything.

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


[U2] Pushing Data out from UniVerse

2007-03-13 Thread Pamela J Robbins
We have a need to push data to another system.  Hopefully, out a port that will
acknowledge the receipt of the data.  We need to send HL7 records from a
hospital system to a radiology system.  Any help would be appreciated.

-- 
Pamela J Robbins   University of Pennsylvania
Sr Programmer/Analyst   School of Veterinary Medicine
mailto: [EMAIL PROTECTED] New Bolton Center 610-444-5800
610-925-6438   Computer help, ext HELP (4357)
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] How much RAM is too much

2007-03-13 Thread Scott Richardson
Why guess and speculate on opinion?

1) Run the DP Monitor on all three boxes (/AD on -  freakishly low overhead
system and per process monitoring with extreme accuracy laid out
graphically, and actually MEASURE and KNOW definitively how much RAM you
will need under any/all conditions. www.deltek.us - tell them CheetahFTL
referred you -  /AD off ).
2) Bag the XP Pro, go W2K3 Server or better yet, Linux..
3) Add RAM to SQL Boxes, and keep each SQL DB on its own box, and increase
NIC card, all network  cabling capacity to handle
100 MB or GB Networking.
4) Monitor pro-actively going forward.

Regards,
Scott

- Original Message - 
From: Charles Barouch [EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Monday, March 12, 2007 2:51 PM
Subject: [U2] How much RAM is too much


 All,
 I need some opinions! I have a client who is willing to spend to put
 up a nice sized box, but they only want to spend once. Here's what they
 need to do: run a 4 user copy of Universe, holding a Type 30 file with a
 mere 200k records. Requests will range from give me one record (average
 size is under 200 bytes) to give me all records.
 The catch is that two SQL databases, with criminally slow network
 connections will be feeding a fresh set of records every hour.
  I need a recommendation on how much RAM and Processor to throw at
 the system so that SQL joins (6 levels deep) don't slow down the
 UniVerse part of the system. The response time has to be obscenely quick
 (eCommerce for a very, very busy site).
 All thoughts appreciated.

 -- 

 Charles Barouch ([EMAIL PROTECTED])
 www.KeyAlly.com (718) 762-3884 x 1
 P. O. Box 540957, Queens, NY 11354
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Error in report generation.

2007-03-13 Thread brian
And the pretty version:

Brian


* define some field locations. Normally these would be placed in
* a separate include file and shared.

EQU INVENTORY.CODE To 1
EQU INVENTORY.DESCRIPTION To 2
EQU INVENTORY.TYPE To 3

* only primitive programmers still use upper case!

Crt Main
Ct = 0

Open INVENTORY.T To INVENTORY Else
  STOP
End
Sent = SSELECT INVENTORY.T BY ITEM_CODE
Execute SENT
EOF = @False
Loop
ReadNext ItemCode Else
  EOF = @True
End
Until EOF Do
Read InventoryRec From INVENTORY, ItemCode Then
  GoSub PrintLine
End
Repeat

Crt

Printer Close ;* terminate nicely

STOP


PrintLine:

Ct += 1
If Not(Mod(Ct,10)) Then Crt .:


Printer On

Print (ITEM CODE   L#16):InventoryRecINVENTORY.CODE
Print (DESCRIPTION L#16):InventoryRecINVENTORY.DESCRIPTION
Print (TYPEL#16):InventoryRecINVENTORY.TYPE

Printer Off

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


RE: [U2] Pushing Data out from UniVerse

2007-03-13 Thread brian
Pam

There is a wealth of options open to you, from web services (BASIC SOAP API), 
direct socket connections, BCI (ODBC), message queues or even flat file. 

The key question will be what the other systems support.

Web services or XML/HTTP are all the vogue, and can be done reasonably easily 
from U2 platforms.

Brian

We have a need to push data to another system.  Hopefully, out a port that 
will
acknowledge the receipt of the data.  We need to send HL7 records from a
hospital system to a radiology system.  Any help would be appreciated.

-- 
Pamela J Robbins   University of Pennsylvania
Sr Programmer/Analyst   School of Veterinary Medicine
mailto: [EMAIL PROTECTED] New Bolton Center 610-444-5800
610-925-6438   Computer help, ext HELP (4357)
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Help with File Pointers

2007-03-13 Thread Rod Hills
Susan,

The FILEINFO path probabily isn't a good recommendation in that it
relies on the entry being their and it will take a lot more overhead.

Here is a small basic program that will parse a relative path.
0001 x=../../this.path/that.path/BANANA
0002 h=/u1/uv/spool
0003 if x[1,1] ne / then x=h:/:x
0004 dim a(30)
0005 matparse a from x using / setting n
0006 i=0
0007 j=0
0008 loop while i  n
0009  i+=1
0010  j+=1
0011  if a(i) eq .. then j=j-1
0012  else a(j)=a(i)
0013 repeat
0014 matbuild x from a,1,j using /
0015 print x

Hope this is what you can use...

Rod Hills

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Monday, March 12, 2007 1:19 PM
To: [EMAIL PROTECTED]
Cc: u2-users@listserver.u2ug.org
Subject: RE: [U2] Help with File Pointers

quote who=Susan Joslyn
 Hi Karl,
 Thanks! The thing is, I can figure out where I am, but I need to
figure
 out where two Fpointers are pointing.

 Say I have two Fpointers (VOC entries):

 001 F
 002 ../../this.path/that.path/BANANA
 003 ../../this.path/that.path/D_BANANA

 And another
 001 F
 002 /u1/ud/this.path/that.path/BANANA
 003 /u1/ud/this.path/that.path/BANANA

 How do I determine for certain that they are (or are not) pointing to
the
 same exact file?

If you SH out to a command prompt, then you can do

cd line 2 on each F-Ptr minus the file itself. If you do this in 2
different command prompts, then type PWD in each, you'll see the exact
path, and if it matches, then you are looking at the same file.

This is one reason not to use relative file points to 'remote' files.
It's
better to use Q-pointers.

I hope this is more clear that my previous feeble attempt.

Karl



 Susan





-- 
Karl Pearson
Director of I.T.
ATS Industrial Supply, Inc.
[EMAIL PROTECTED]
http://www.atsindustrial.com
800-789-9300 x29
Local: 801-978-4429
Fax: 801-972-3888

To mess up your Linux PC, you have to really work at it;
 to mess up a microsoft PC you just have to work on it.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
___

This e-mail and any attachments are for the sole use of the 
intended recipient(s) and may contain privileged and 
confidential information. Any unauthorized review, use, 
disclosure or distribution is strictly prohibited. If you are not 
the intended recipient(s), please contact the sender by reply 
e-mail and destroy all copies of the original message.
Thank you.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] unidata - setting unidata env on windows

2007-03-13 Thread Doug Chanco
Hey all,

 Does anyone know how to set an env. variable on unidata running on
windows? (2003 server is the OS), I am trying to set the UDT_EDIT to
allow us to use vi as the default editor



Thanks!





Dougc



_

Doug Chanco

Engineer Developer Senior, TLOTLD



Activant Solutions Inc.(tm)

Austin, Texas 78746

T: 800-678-5426

F: 512-278-5915

E-mail: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]

Web site: www.activant.com http://www.activant.com/

_





Notice: This transmission is for the sole use of the intended recipient(s) and
may contain information that is confidential and/or privileged.  If you are
not the intended recipient, please delete this transmission and any
attachments and notify the sender by return email immediately.  Any
unauthorized review, use, disclosure or distribution is prohibited.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: *** GMX Spamverdacht *** Re: [U2] Error in report generation.

2007-03-13 Thread Mecki Förthmann

Is this going to become a pissing-contest?

[EMAIL PROTECTED] schrieb:

And the pretty version:

Brian


* define some field locations. Normally these would be placed in
* a separate include file and shared.

EQU INVENTORY.CODE To 1
EQU INVENTORY.DESCRIPTION To 2
EQU INVENTORY.TYPE To 3

* only primitive programmers still use upper case!

Crt Main
Ct = 0

Open INVENTORY.T To INVENTORY Else
  STOP
End
Sent = SSELECT INVENTORY.T BY ITEM_CODE
Execute SENT
EOF = @False
Loop
ReadNext ItemCode Else
  EOF = @True
End
Until EOF Do
Read InventoryRec From INVENTORY, ItemCode Then
  GoSub PrintLine
End
Repeat

Crt

Printer Close ;* terminate nicely

STOP


PrintLine:

Ct += 1
If Not(Mod(Ct,10)) Then Crt .:


Printer On

Print (ITEM CODE   L#16):InventoryRecINVENTORY.CODE
Print (DESCRIPTION L#16):InventoryRecINVENTORY.DESCRIPTION
Print (TYPEL#16):InventoryRecINVENTORY.TYPE

Printer Off

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

  




___ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

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


Re: *** GMX Spamverdacht *** Re: [U2] Error in report generation.

2007-03-13 Thread brian
No :)

But he is just learning BASIC, so he might as well start with some good 
conventions - like using EQUATEs for field numbers.

Brian


Is this going to become a pissing-contest?

[EMAIL PROTECTED] schrieb:
 And the pretty version:

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


RE: [U2] Reports In Universe BASIC

2007-03-13 Thread Allen E. Elwood
Wasn't trying to be quick...

Some people like headings that are not fancy, some people like fancy.  More
people like fancy than non fancy.  57 lines of code isn't squat on a hard
drive that can handle 60 hours of digital video, eh?  I have been
programming since 1974, professionally since 1978.  Could it have been done
as a subr?  Yeah, sure.  Is a subr slower?  Yeah, sure...  57 lines of code,
times a 100 reports, not even close to being huge.  Very tiny on a 250gb
drive.

No offence taken!  I was actually replying to your post, not the newbie, for
*ideas*.  Using a basic program to ask questions, form the headings based on
the answers, form the query based on the answers, then PERFORM it creates a
basic program-like output without a lot of work.  And it also creates an
easy to use skeleton that can be copied and modified with ease to make new
reports that look fantastic, with very little work.  And all
questions/options handling is done in BASIC instead of proc language which
does change quite a bit depending on what platform you're on, and what
flavor the installation is.

Remember the recent Dilbert, after creating an enormous database of
actualized goals, the raises were handed out on how the employees looked.
The way a report *looks* counts for *a lot* of how the programmer is
perceived by management.

And I don't straddle a lot of platforms.  My headings are actually my own
version which is similar to the ones used on Manage-2000.  *All* headings on
all M2K reports have almost exactly the same format, although it's a
completely different code that I wrote from scratch since theirs was kind of
dumb and more code...

MCL makes it lower case, which is what I wanted, not MCT, remember I said
this was MvBASE code.

Easy to understand is only necessary for code you want to change.  Sometimes
when you create code that is good enough to keep the same, maintenance is
not necessary.  Headings, like record locking, can be written once and
forgotten if enough options are written in.  M2K's headings have been
virtually the same since 1980 or so.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of MAJ Programming
Sent: Monday, March 12, 2007 17:22
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Reports In Universe BASIC


Again, some quicker methods:

1. U50BB is supported on all platforms. Use it for the Port and Account and
possibly the user-id. Put this stuff in an external sub called GET.PORT or
GET.ACCT or GET.USER to not re-invent it every time. Plus, if you straddle
platforms like I do, I can always use CALL GET.PORT(PORT) and only
platform-ize it once.

2. The Date  TIme stuff is overly fancy. Just use TIMEDATE() as it matches
the 'T' part of the heading/footing string. Or use 'D'.

3. Your DAY=  thing on line #3 should just be an MCT for mixed casing.

4. Does not Ud  UV support the 'C' expression in headings/footings as well
as the justification C#132? I miss it on D3.

I'm a very experienced MV programmer and to have 57 lines of code devoted to
headings is, IMHO, excessive. If the home-rule 'standard' were to have
consistent headings, put this in a subroutine and just pass the titles to
it. I hope every program doesn't start like this.

No offense, but this is a lot to show for headings to a newbie. It may
intimidate and he may believe that they all must be this busy.

One thing that will come from these submitted program snippets is the review
and suggestions for improvement. As I have traveled on perhaps 50-60
different MV systems in my career, I've certainly seen many code samples
that I want to use again and many that I want to replace. I'm not the best
but I feel that I can offer up pretty useful opinions on what is easy-to
read and understand code.

Respectfully,
Mark Johnson
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: *** GMX Spamverdacht *** Re: [U2] Error in report generation.

2007-03-13 Thread Allen Egerton

Mecki FC6rthmann wrote:

Is this going to become a pissing-contest?


snip

Actually it's a fairly interesting thread, presenting a couple options 
for the original poster, along with various styles of coding for him/her 
to look at and think about.  Not a bad thing.


--
Allen Egerton
aegerton at pobox dot com
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] unidata - setting unidata env on windows

2007-03-13 Thread Bill H
Doug:

I believe you can alter the udtconfig file in udthome\include (mine's in
E:\IBM\ud71\include).  You can also right-click on My Computer  Properties
 Advanced tab  Environment Variables button and add what you want.  You
can also execute the command set ENVIRONMENT_VARIABLE Value.

The documentation indicates one cannot change environment variables for a
session while in the session.

Hope this helps.

Bill

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Doug Chanco
Sent: Tuesday, March 13, 2007 9:39 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] unidata - setting unidata env on windows

Hey all,

 Does anyone know how to set an env. variable on unidata running on
windows? (2003 server is the OS), I am trying to set the UDT_EDIT to allow
us to use vi as the default editor

Thanks!


Dougc
_

Doug Chanco

Engineer Developer Senior, TLOTLD
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] unidata - setting unidata env on windows

2007-03-13 Thread Doug Chanco
Yes it does, thanks very much, I sure do miss good 'ole unix/linux

But thanks!

Dougc
 
_
Doug Chanco
Engineer Developer Senior, TLOTLD
 
Activant Solutions Inc.(tm)
Austin, Texas 78746
T: 800-678-5426
F: 512-278-5915
E-mail: [EMAIL PROTECTED] 
Web site: www.activant.com
_
 

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:owner-u2-
 [EMAIL PROTECTED] On Behalf Of Bill H
 Sent: Tuesday, March 13, 2007 12:50 PM
 To: u2-users@listserver.u2ug.org
 Subject: RE: [U2] unidata - setting unidata env on windows
 
 Doug:
 
 I believe you can alter the udtconfig file in udthome\include
(mine's in
 E:\IBM\ud71\include).  You can also right-click on My Computer 
 Properties
  Advanced tab  Environment Variables button and add what you want.
You
 can also execute the command set ENVIRONMENT_VARIABLE Value.
 
 The documentation indicates one cannot change environment variables
for a
 session while in the session.
 
 Hope this helps.
 
 Bill
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Doug Chanco
 Sent: Tuesday, March 13, 2007 9:39 AM
 To: u2-users@listserver.u2ug.org
 Subject: [U2] unidata - setting unidata env on windows
 
 Hey all,
 
  Does anyone know how to set an env. variable on unidata running
on
 windows? (2003 server is the OS), I am trying to set the UDT_EDIT to
allow
 us to use vi as the default editor
 
 Thanks!
 
 
 Dougc
 _
 
 Doug Chanco
 
 Engineer Developer Senior, TLOTLD
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/


Notice: This transmission is for the sole use of the intended recipient(s) and 
may contain information that is confidential and/or privileged.  If you are not 
the intended recipient, please delete this transmission and any attachments and 
notify the sender by return email immediately.  Any unauthorized review, use, 
disclosure or distribution is prohibited.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] unidata - setting unidata env on windows

2007-03-13 Thread Dave Davis
We use the My ComputerPropertiesAdvanced TabEnvironment Variables
option.

Do you actually have vi available on your windows server? 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bill H
Sent: Tuesday, March 13, 2007 1:50 PM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] unidata - setting unidata env on windows

Doug:

I believe you can alter the udtconfig file in udthome\include (mine's
in E:\IBM\ud71\include).  You can also right-click on My Computer 
Properties
 Advanced tab  Environment Variables button and add what you want.  
 You
can also execute the command set ENVIRONMENT_VARIABLE Value.

The documentation indicates one cannot change environment variables for
a session while in the session.

Hope this helps.

Bill

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Doug Chanco
Sent: Tuesday, March 13, 2007 9:39 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] unidata - setting unidata env on windows

Hey all,

 Does anyone know how to set an env. variable on unidata running on
windows? (2003 server is the OS), I am trying to set the UDT_EDIT to
allow us to use vi as the default editor

Thanks!


Dougc
_

Doug Chanco

Engineer Developer Senior, TLOTLD
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] Guide

2007-03-13 Thread Susan Joslyn
Hello again group.
Now I'm trying to sort out guide and other tools that one might use to
examine and evaluate ones file system.
I can find help on GUID in the HELP GUIDE from TCL and I can find it in the
admin manual.  But when I type it, nothing happens.  Do I need to install
something?  Somewhere I found the suggestion to run FILE-STAT, which I can
do.  But it doesn't offer anywhere nearly the level of detailed information
that I see documented in guide.

I'm on windows, is guide a unix only thing or something?

All help appreciated.
(Still plugging away on the file pointer issue, thanks again to everyone who
had an idea on that.)
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Guide

2007-03-13 Thread Dave Davis
You are talking about unidata here I hope?

guide actually creates files (GUIDE_ADVICE.LIS, GUIDE_ERRORS.LIS,
GUIDE_STATS.LIS).  You run it at the system level as opposed to at the
TCL level.  If you already had GUIDE*LIS files from a previous run, it
puts a suffix at the end of those.

Also, keep in mind the difference between FILE-STAT output and
file.stat output.  file.stat is much more informative.  You also
have group.stat

I've used file.stat output on all of the files defined in the xxCONTROL
FILES entry to create a resizing paragraph for dictionary files.  I find
it easier to use for most things.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Susan Joslyn
Sent: Tuesday, March 13, 2007 3:25 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Guide

Hello again group.
Now I'm trying to sort out guide and other tools that one might use to
examine and evaluate ones file system.
I can find help on GUID in the HELP GUIDE from TCL and I can find it in
the admin manual.  But when I type it, nothing happens.  Do I need to
install something?  Somewhere I found the suggestion to run FILE-STAT,
which I can do.  But it doesn't offer anywhere nearly the level of
detailed information that I see documented in guide.

I'm on windows, is guide a unix only thing or something?

All help appreciated.
(Still plugging away on the file pointer issue, thanks again to everyone
who had an idea on that.)
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Guide

2007-03-13 Thread Baakkonen, Rodney A (Rod) 46K
Don't forget to use the -r option so that it builds a database of your guide
statistics. Then you can run uniquery reports off the stats.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Susan Joslyn
Sent: Tuesday, March 13, 2007 1:25 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Guide


Hello again group.
Now I'm trying to sort out guide and other tools that one might use to
examine and evaluate ones file system.
I can find help on GUID in the HELP GUIDE from TCL and I can find it in the
admin manual.  But when I type it, nothing happens.  Do I need to install
something?  Somewhere I found the suggestion to run FILE-STAT, which I can
do.  But it doesn't offer anywhere nearly the level of detailed information
that I see documented in guide.

I'm on windows, is guide a unix only thing or something?

All help appreciated.
(Still plugging away on the file pointer issue, thanks again to everyone who
had an idea on that.)
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Pushing Data out from UniVerse [ad]

2007-03-13 Thread Tony Gravagno
When people request information about communications, my first instinct is
to jump to respond with a reference to mv.NET.  I seriously do refrain from
most such ads.  Please note however that mv.NET is good for the sort of
Push from MV request that we see here.  It's also good for integration
with relational databases, for Web Services, for XML handling, for SOA, for
website and thick-client development, and for so many of the other requests
we see here.  If you have any questions about how to do something, just
remember that mv.NET is probably one of many viable solutions.  More
importantly, rather than using several technologies for a variety of needs,
consider the elegance of using one tool for almost all of your needs.  This
is especially of benefit to VARs, to avoid having to install (and maintain)
so many different tools on end-user systems.

mv.NET is a suite of libraries for doing many things.  As an affirmation of
its value, IBM has recently licensed mv.NET so that they can sell and
support it.  How much more of a stamp of approval can we get?  Why not use
UO.NET?  It's free and a good connectivity pipe but it's a very simple
library which requires the developer to write a lot of code to wrap around
it.  mv.NET already has three useful code wrapped around the pipe, and in
fact, mv.NET uses UO.NET as the pipe into Universe and Unidata.

Contact me if you'd like to evaluate mv.NET.  Nebula RD is an authorized
international reseller of mv.NET and provides product support, training,
and related development services.  Our resources include a recognized
Microsoft C# MVP and other talented Microsoft-certified developers.

BlueFinity International has an mv.NET Conference in May in the Miami area.
The conference is $99 and attendees receive a complimentary development
license for mv.NET.  Contact me for details.

Thanks and Regards,
Tony Gravagno
Nebula Research and Development
TG@  please.remove.this.anti.spam.textNebula-RnD.com

brian wrote:
 Pam
 
 There is a wealth of options open to you, from web services (BASIC
 SOAP API), direct socket connections, BCI (ODBC), message queues or
 even flat file.  
 
 The key question will be what the other systems support.
 
 Web services or XML/HTTP are all the vogue, and can be done
 reasonably easily from U2 platforms. 
 
 Brian
 
 We have a need to push data to another system.  Hopefully, out a port
 that will acknowledge the receipt of the data.  We need to send HL7
records
 from a hospital system to a radiology system.  Any help would be
appreciated.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] Updated Outlook Subject Filters (free)

2007-03-13 Thread Tony Gravagno
The latest version of my free filter macros for Microsoft Outlook has been
posted for anyone who wants it.  In short, these macros clean up subject
headings, eliminating junk added as email moves between clients and
servers.  Subjects are also slightly reformatted to make them more sortable
and searchable.  Most of the filters were specifically added in response to
junk we see in this forum.  I believe the current version handles every
anomaly I've seen in this forum to-date.  Convert one mail item or your
entire folder in one click on the toolbar.

There's no adware or add-on products, the software just does what it's
intended to do, and I hope you find it as useful as I have.  Download
outlook_mail_subject_macro4.txt from remove.thisNebula-RnD.com/freeware.
See the README.txt for explanations of the other free offerings there.

Comments at the top of the code describe in detail what the macros do and
how to install the code.  The comments below show updates made since
11/2006.

Regards,
Tony Gravagno, Nebula Research and Development
TG@ remove.this.anti.spam.textNebula-RnD.com

'20070313 TG : Added check for *** GMX Spamverdacht ***. Does it never
stop?
'20070312 TG : Added another check for unclassified:.
'20070311 TG : Remove {Blocked Content} tag.
'20070206 TG : Remove spam: tag.
'20061116 TG : Runs through conversion twice (optional), required for rare
items
'20061115 TG : Added final removal of extra spaces
'20061115 TG : Convert AW: to RE: for English
'20061115 TG : Catch Bayesian Filter detected spam and other [SPAM]
references
'20061115 TG : Standardize [adv] into [AD], other related handling
'20061115 TG : Put [U2] and [OT] type tags behind RE:
'20061115 TG : Remove AW:[SPAM] tag.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Universe/UniObjects and Visual Studio

2007-03-13 Thread Anthony Dzikiewicz
Thanks
This link was very helpful.  I did finally figure it out and the
examples list exactly what I ended up doing.  The tutorial was excellent
and put me in the right direction.  This is also what I was looking for
in respect to java programming.  I was hoping to find a very simple data
entry program to get me going.  
Thanks
Anthony

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Monday, March 12, 2007 4:42 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Universe/UniObjects and Visual Studio


Anthony

there is a tutorial on using UniObjects with VB Express on the U2UG
Knowledge Base.

Check out : www.mvopen.org/cms and click the Knowledge Base link.

Regards,

Brian

Hi guys,

I am messing with Visual Basic Express edition.  I was hoping to use
UniObjects against my Universe Database.  The examples in the UniObjects
Developers Guide are a little outdated.  How do I get the UniObjects to
appear in the toolbar (if you can do this) ? They refer to Sub
Form_Load, which I have seen in older versions of VB, but not VB 2005.
Basically what I am looking for is a 'quick fix' for the 5 minute
program example in the Developers Guide that has already taken me beyond
that time frame.

Thanks
Anthony

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.8/716 - Release Date: 3/9/2007
6:53 PM
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.8/716 - Release Date: 3/9/2007
6:53 PM
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.10/720 - Release Date:
3/12/2007 7:19 PM
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Error in report generation.

2007-03-13 Thread Boydell, Stuart
Instead - why not use the Retrieve language from the command line
without bothering with a basic program? Type the following at the
command line will give you the result your program is trying to acheive:

SORT  INVENTORY BY ITEM_CODE ITEM_CODE CONV T16 DESCRIPTION CONV T16
TYPE CONV T16  VERTICALLY

Also, noting that you are outputting vertically, are you trying to print
labels? There is a LIST.LABEL verb designed specifically for that task.
Stuart

-Original Message-
I tried to generate a report by writing a small program. But I got an
error
as below.

 
**
This email message and any files transmitted with it are confidential and 
intended solely for the use of addressed recipient(s). If you have received 
this communication in error, please reply to this e-mail to notify the sender 
of its incorrect delivery and then delete it and your reply.  It is your 
responsibility to check this email and any attachments for viruses and defects 
before opening or sending them on. Spotless collects information about you to 
provide and market our services. For information about use, disclosure and 
access, see our privacy policy at http://www.spotless.com.au 
Please consider our environment before printing this email. 
** 
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] printers

2007-03-13 Thread will
Does anyone know or know where to find documentation on printers.  Not 
just the SP.ASSIGN and SET.PTR types of verbs, but the actual link from 
cable to print command?  A kind of trace from hardware, through 
operating system (unix/linux), on to Universe and Basic.  What are the 
handoffs from data out to spooler to buffer?


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


Re: [U2] Reports In Universe BASIC

2007-03-13 Thread MAJ Programming
I am blessed with having transversed through over mv 60 systems in my
career. That gives me some methods to compare when desiring the same
function.

I submit what I consider the best method that I have accumulated. I am
always open for new methods for these building blocks of code snippets.

Not working with any 4GL's, my world is 90% hand-written source code (both
mine and what I inherit). The other 10% was from source code generators
which vary widely in their usefullness.

Since I don't get paid by the line, I tend to KISS. So using the most brief
piece of code for each task is paramount. Plus, I can write these subs once
per platform and use them continuously without being platform concerned.

I offer MCT as the code indicated to keep the first character as-is and MCL
the [2,1000] of it. If the text were multiple words and you wanted only the
first word capitalized, then I stand corrected.

I inherit lots of code. It amazes me what differences there are working
towards the same goal.

My 1 cent.
Mark Johnson
- Original Message -
From: Allen E. Elwood [EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Tuesday, March 13, 2007 12:31 PM
Subject: RE: [U2] Reports In Universe BASIC


 Wasn't trying to be quick...

 Some people like headings that are not fancy, some people like fancy.
More
 people like fancy than non fancy.  57 lines of code isn't squat on a hard
 drive that can handle 60 hours of digital video, eh?  I have been
 programming since 1974, professionally since 1978.  Could it have been
done
 as a subr?  Yeah, sure.  Is a subr slower?  Yeah, sure...  57 lines of
code,
 times a 100 reports, not even close to being huge.  Very tiny on a 250gb
 drive.

 No offence taken!  I was actually replying to your post, not the newbie,
for
 *ideas*.  Using a basic program to ask questions, form the headings based
on
 the answers, form the query based on the answers, then PERFORM it creates
a
 basic program-like output without a lot of work.  And it also creates an
 easy to use skeleton that can be copied and modified with ease to make new
 reports that look fantastic, with very little work.  And all
 questions/options handling is done in BASIC instead of proc language which
 does change quite a bit depending on what platform you're on, and what
 flavor the installation is.

 Remember the recent Dilbert, after creating an enormous database of
 actualized goals, the raises were handed out on how the employees looked.
 The way a report *looks* counts for *a lot* of how the programmer is
 perceived by management.

 And I don't straddle a lot of platforms.  My headings are actually my own
 version which is similar to the ones used on Manage-2000.  *All* headings
on
 all M2K reports have almost exactly the same format, although it's a
 completely different code that I wrote from scratch since theirs was kind
of
 dumb and more code...

 MCL makes it lower case, which is what I wanted, not MCT, remember I said
 this was MvBASE code.

 Easy to understand is only necessary for code you want to change.
Sometimes
 when you create code that is good enough to keep the same, maintenance is
 not necessary.  Headings, like record locking, can be written once and
 forgotten if enough options are written in.  M2K's headings have been
 virtually the same since 1980 or so.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of MAJ Programming
 Sent: Monday, March 12, 2007 17:22
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] Reports In Universe BASIC


 Again, some quicker methods:

 1. U50BB is supported on all platforms. Use it for the Port and Account
and
 possibly the user-id. Put this stuff in an external sub called GET.PORT or
 GET.ACCT or GET.USER to not re-invent it every time. Plus, if you straddle
 platforms like I do, I can always use CALL GET.PORT(PORT) and only
 platform-ize it once.

 2. The Date  TIme stuff is overly fancy. Just use TIMEDATE() as it
matches
 the 'T' part of the heading/footing string. Or use 'D'.

 3. Your DAY=  thing on line #3 should just be an MCT for mixed casing.

 4. Does not Ud  UV support the 'C' expression in headings/footings as
well
 as the justification C#132? I miss it on D3.

 I'm a very experienced MV programmer and to have 57 lines of code devoted
to
 headings is, IMHO, excessive. If the home-rule 'standard' were to have
 consistent headings, put this in a subroutine and just pass the titles to
 it. I hope every program doesn't start like this.

 No offense, but this is a lot to show for headings to a newbie. It may
 intimidate and he may believe that they all must be this busy.

 One thing that will come from these submitted program snippets is the
review
 and suggestions for improvement. As I have traveled on perhaps 50-60
 different MV systems in my career, I've certainly seen many code samples
 that I want to use again and many that I want to replace. I'm not the best
 but I feel that I can offer up pretty useful opinions 

Re: [U2] Error in report generation.

2007-03-13 Thread MAJ Programming
How does using upper case make a programmer primitive?

Considering that beaucoups of prior source code is in pure upper case, it
would be hard to cost justify changing the case for its own sake.

Accuterm's WED program editor allows you to assign different colors to
comments, variables, statements, labels and text. Thus, the readability of a
pure upper case system is enhanced through color.

shameless AD
Everyone should give WED a try. Besides the colors, it's indentable, you can
double click on a label, CALL reference or an INCLUDE and it jumps to those
code sections. All the standard Notepad MS feel. Multiple screens.
/shameless AD

D3 has a lower case version of Data/Basic that's not interchangable with the
upper case version. IMHO, the mixed casing programming comes from other
languages like VB that doesn't allow a period as a variable character,
rather as an object-method/property separator. Zillions of MV programs are
written with CUST.NAME instead of CustName.

I continue to use pure upper case for programming and keep mixed casing for
the user screens and prompts. If that causes me to drag my knuckles, then so
be it.

My 1 cent.
Mark Johnson
- Original Message -
From: [EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Tuesday, March 13, 2007 11:00 AM
Subject: Re: [U2] Error in report generation.


 And the pretty version:

 Brian


 * define some field locations. Normally these would be placed in
 * a separate include file and shared.

 EQU INVENTORY.CODE To 1
 EQU INVENTORY.DESCRIPTION To 2
 EQU INVENTORY.TYPE To 3

 * only primitive programmers still use upper case!

 Crt Main
 Ct = 0

 Open INVENTORY.T To INVENTORY Else
   STOP
 End
 Sent = SSELECT INVENTORY.T BY ITEM_CODE
 Execute SENT
 EOF = @False
 Loop
 ReadNext ItemCode Else
   EOF = @True
 End
 Until EOF Do
 Read InventoryRec From INVENTORY, ItemCode Then
   GoSub PrintLine
 End
 Repeat

 Crt

 Printer Close ;* terminate nicely

 STOP


 PrintLine:

 Ct += 1
 If Not(Mod(Ct,10)) Then Crt .:


 Printer On

 Print (ITEM CODE   L#16):InventoryRecINVENTORY.CODE
 Print (DESCRIPTION L#16):InventoryRecINVENTORY.DESCRIPTION
 Print (TYPEL#16):InventoryRecINVENTORY.TYPE

 Printer Off

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


Re: [U2] Error in report generation.

2007-03-13 Thread MAJ Programming
I'm gonna throw my 4 cents in to hopefully stop this excessive coding.

snip
 0005: EOF = 0
 0006: LOOP
 0007: READNEXT ITEM_CODE ELSE
 0008: EOF = 1
 0009: END
 0010: UNTIL EOF DO
/snip

Can be replaced with one line that's pretty readable:

ud/uv version:
LOOP WHILE READNEXT ID DO
or the D3 version
LOOP READNEXT ID ELSE EXIT UNTIL 0 DO
or even the Mvbase or Microdata version
LOOP READNEXT ID ELSE ID=@@@ UNTIL ID=@@@ DO  ( use @@@ or whatever is
not a likely item-id)

I have read these EOF=FALSE blah, blah, blah ways of avoiding the GOTO
statements for almost 30 years. It's pretty tiring and does not need to be
perpetuated.

While anyone can argue that we have an infinite amount of resources (disc
space, RAM etc), we are still human programmers reading source code.
Condensing the code isn't for the system's sake, it's for the programmer's
sake.

Please, anyone who's new to MV should consider more than one style of
programming examples. From what I continue to view, It's perpetuating the
technique first learned with no opportunity for learning a better or shorter
way.

Another pet peeve of mine is the habit of using the null DICT portion when
OPENing a file. I recall in the late 1970's when I accidentally forgot to
include it on a Microdata and it compiled and worked anyway. Haven't looked
back on that useless parameter.

Old School:
OPEN ,ABC TO F.ABC ELSE xxx
Works on all Platforms:
OPEN ABC TO F.ABC ELSE xxx
also
OPEN DICT ABC TO D.ABC ELSE xxx

I forego the entire OPEN mess with a subroutine that does not cause the
bother of the wide variety of Can't Open scenarios. 99% of the time, the
OPENing of a file is a must-do, ie if you can't don't continue. There is the
less than 1% of the time where opening a file is a logical THEN/ELSE. Most
of the time it's a requirement for the rest of the program to continue.

Therefore, I use a sub called OPENER that I published in an issue of
Spectrum. It's use is:

CALL OPENER(ABC, F.ABC)
or
CALL OPENER(DICT ABC, D.ABC)

and in that subroutine, you can write War  Peace if you want to get that
verbose about a file not opening.

My point is, I have seen some pretty stupid methods of handling these 99%
OPEN scenarios. It's a 'housekeeping' section of the program that should be
blown past without too much fanfare in the source code. Thus you can have
this:

CALL OPENER(FILE1, F.FILE1)
CALL OPENER(FILE2, F.FILE2)
CALL OPENER(FILE3, F.FILE3)

instead of these 3 ridiculous methods

OPEN FILE1 TO F.FILE1 ELSE PRINT CANNOT OPEN FILE1. PLEASE CALL TECH
SUPPORT. PROGRAM TERMINATING ; STOP
OPEN FILE2 TO F.FILE2 ELSE PRINT CANNOT OPEN FILE2. PLEASE CALL TECH
SUPPORT. PROGRAM TERMINATING ; STOP
OPEN FILE3 TO F.FILE3 ELSE PRINT CANNOT OPEN FILE3. PLEASE CALL TECH
SUPPORT. PROGRAM TERMINATING ; STOP

or
OPEN FILE1 TO F.FILE1 ELSE
PRINT CANNOT OPEN FILE1. PLEASE CALL TECH SUPPORT
ERR.SW=1
END
OPEN FILE2 TO F.FILE2 ELSE
PRINT CANNOT OPEN FILE2. PLEASE CALL TECH SUPPORT
ERR.SW=1
END
OPEN FILE3 TO F.FILE3 ELSE
PRINT CANNOT OPEN FILE2. PLEASE CALL TECH SUPPORT
ERR.SW=1
END

or this doozy of a mess
OPEN FILE1 TO F.FILE1 THEN
 OPEN FILE2 TO F.FILE2 THEN
  OPEN FILE3 TO F.FILE3 THEN
   500 LINES OF PROCESSING AS PER APPLICATION
  END ELSE
PRINT CAN'T OPEN FILE3
 END
 END ELSE
 PRINT CAN'T OPEN FILE2
 END
END ELSE
 PRINT CAN'T OPEN FILE1
END

Please, lets not spend so much effort on this simple task. OPEN them and get
on with it.

I work with a guy who sometimes uses method 2 above and sometimes uses
method 3 above. I try to show him the simplicity of OPENER (it's already on
that system) but he continues to respond But that's how I was taught.
Pretty stupid. I even have a program called MAKE.OPENER that will go through
source code and replace whatever open statements exist with OPENER.

I don't know the approval or voting process on what methods are useful to
show the newbies so they start off on the right foot.

Respectfully submitted
Mark Johnson




- Original Message -
From: Sanjeebkumar Sarangi [EMAIL PROTECTED]
To: u2-users@listserver.u2ug.org
Sent: Tuesday, March 13, 2007 6:40 AM
Subject: [U2] Error in report generation.


 Hi
 I tried to generate a report by writing a small program. But I got an
error
 as below.

 ERROR:

 RUN TEST.BP MAIN
 MAIN

 45 record(s) selected to SELECT list #0.
 Program SUB: Line 3, Variable REC previously undefined.  Empty string
 used.
 Program SUB: Line 3, Printer name UVDEFAULT is not recognized by the
 system.

 CODE:

 ED TEST.BP
 Record name = MAIN
 15 lines long. 0005: EOF = 0
 0006: LOOP
 0007: READNEXT ITEM_CODE ELSE
 0008: EOF = 1
 0009: END
 0010: UNTIL EOF DO

 : P
 0001: CRT 'MAIN'
 0002: OPEN 'INVENTORY.T' TO INEVNTORY ELSE STOP
 0003: SENT = 'SSELECT INVENTORY.T BY ITEM_CODE'
 0004: EXECUTE SENT

 0011: READ  REC FROM INEVNTORY ,ITEM_CODE THEN
 0012: CALL SUB
 0013: END
 0014: REPEAT
 0015: STOP
 Bottom at line 15.
 : Q

 File