Re: Re: [UD] Determining if list exists

2004-02-04 Thread Mark Johnson



Your proc example doesn't need the P after the STON 
in line 3. The reasons you have the STON, H< and P(x) on lines 7,8,9 is 
twofold. The first reason is that in a typical GET-LIST/LIST pairing, your list 
statement could exceed the maximum size of the Secondary Output buffer (STON 
without the H< and P). That required Secondary Output buffer extensions of 
H<< which needed to be properly placed and when changes were made, you had 
to recalculate where they belonged.
 
Using the STON, H<, P then the HLIST put the 
entire LIST statement into the Primary Output buffer which is seemingly 
limitless. Like a paragraph, you were executing 2 consecutive 
statements.
 
The downside is that if the preceeding SELECT 
doesn't yield any items or the GET-LIST comes up empty, the HLIST will process 
your report against the entire file. Thus the IF E=401 concept was introduced to 
validate the active list.
 
That psycho couldn't possibly have programmed that 
on purpose. I've seen some excessive use of STOFF/STON pairs, ie STOFF after a P 
when it comes automatically. (Like RI then S1. Duh, RI implies S1). The fact 
that the psycho alternated their two sentence's words in consecutive statements 
was either to hide some code or fool around. 
 
my 1 cent

  - Original Message - 
  From: 
  [EMAIL PROTECTED] 
  
  To: U2 Users Discussion List 
  Sent: Wednesday, February 04, 2004 2:06 
  PM
  Subject: Re: Re: [UD] Determining if list 
  exists
  I think that the reason so 
  many mv'ers don't like procs is they don't understand them.  HSSELECT AR WITH PAYMENT.DATE GE "2-9-04"STONPHSAVE-LIST 
  ARLISTPHGET-LIST ARLISTSTONH<PHHLIST AR 
  PAYMENT.DATE LPTRP  I don't want to 
  hurt anyone's feelings, but, this is almost funny. Why would you stack on just prior to the perform? 
   Why would you stack on, carriage return then perform hushed?  The 
  idea is to load your output buffers, primary and secondary, and execute 
  them. Sigh...  I guess I'm one of 
  the few left who even know what STON or STOFF does...   Here's a test for you.  Some psycho left this on 
  your system, what does this proc do? PQ HGET STON HLIST STOFF H-LIST STON H VOC STOFF H 
  BMN PW Bruce M NeylonHealth Care Management Group 
  
  
  

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


Re: Re: [UD] Determining if list exists

2004-02-04 Thread BNeylon

Now that is elegant ! :-)

Bruce M Neylon
Health Care Management Group 







Glenn Herbert <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
02/04/2004 02:09 PM
Please respond to U2 Users Discussion List

        
        To:        U2 Users Discussion List <[EMAIL PROTECTED]>
        cc:        
        Subject:        Re: Re: [UD] Determining if list exists

How about this one to end this thread?

M
S1
IH%1:U50BB:
T %2,">",+
IBP %1
H%1
P
GO B       

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


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


Re: Re: [UD] Determining if list exists

2004-02-04 Thread Glenn Herbert
How about this one to end this thread?

M
S1
IH%1:U50BB:
T %2,">",+
IBP %1
H%1
P
GO B   

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


Re: Re: [UD] Determining if list exists

2004-02-04 Thread Glenn Herbert
LOL

GET-LIST BMN
LIST VOC
At 02:06 PM 02/04/2004, you wrote:

I think that the reason so many mv'ers don't like procs is they don't 
understand them.

HSSELECT AR WITH PAYMENT.DATE GE "2-9-04"
STON
P
HSAVE-LIST ARLIST
P
HGET-LIST ARLIST
STON
H<
PH
HLIST AR PAYMENT.DATE LPTR
P

I don't want to hurt anyone's feelings, but, this is almost funny.
Why would you stack on just prior to the perform?  Why would you stack on, 
carriage return then perform hushed?  The idea is to load your output 
buffers, primary and secondary, and execute them.
Sigh...  I guess I'm one of the few left who even know what STON or STOFF 
does...
Here's a test for you.  Some psycho left this on your system, what does 
this proc do?
PQ
HGET
STON
HLIST
STOFF
H-LIST
STON
H VOC
STOFF
H BMN
PW

Bruce M Neylon
Health Care Management Group
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: Re: [UD] Determining if list exists

2004-02-04 Thread BNeylon

I think that the reason so many mv'ers don't like procs is they don't understand them.

HSSELECT AR WITH PAYMENT.DATE GE "2-9-04"
STON
P
HSAVE-LIST ARLIST
P
HGET-LIST ARLIST
STON
H<
PH
HLIST AR PAYMENT.DATE LPTR
P

I don't want to hurt anyone's feelings, but, this is almost funny.
Why would you stack on just prior to the perform?  Why would you stack on, carriage return then perform hushed?  The idea is to load your output buffers, primary and secondary, and execute them.
Sigh...  I guess I'm one of the few left who even know what STON or STOFF does...  
Here's a test for you.  Some psycho left this on your system, what does this proc do?
PQ
HGET
STON
HLIST
STOFF
H-LIST
STON
H VOC
STOFF
H BMN
PW


Bruce M Neylon
Health Care Management Group 
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


Re: Re: [UD] Determining if list exists

2004-02-03 Thread Mark Johnson



Likewise if you're using new proc you may use the 
original ERRMSG file indicator as
HSELECT FILE WHATEVER
STON
HSAVE-LIST LISTNAME
P
IF E = 401 GO somewhere as there were no items 
selected.

  - Original Message - 
  From: 
  [EMAIL PROTECTED] 
  To: U2 Users Discussion List 
  Sent: Tuesday, February 03, 2004 9:02 
  AM
  Subject: Memo: Re: [UD] Determining if 
  list exists
  Hi Chris,I believe there is the IF S or 
  the IF #S construct that you can use in aproc to test the existence or 
  otherwise of a select list.So if you modify your proc:HSSELECT 
  AR WITH PAYMENT.DATE GE "2-9-04"STONPHSAVE-LIST 
  ARLISTPHGET-LIST ARLISTSTONHSent by:    
  [EMAIL PROTECTED]To:    
  <[EMAIL PROTECTED]>cc:bcc:Subject:    
  [UD]Determining if list existsIs there a Unidata or Uniquery 
  command that tells you if a select listexists?  In UniBasic I can use 
  a SelectInfo function to determine if alist exists, but I can't find a way 
  to do it at the TCL prompt.I have the following PQN PROC.  The 
  PROC itself works fine if there issomething to return from the selection 
  criteria.  However, if nothing isselected in the SELECT statement 
  (like the one below would if we ran ittoday), the PROC does what it is 
  told and lists the whole file, since itis never given a list, resulting in 
  a huge printout of every ARtransaction.HSSELECT AR WITH 
  PAYMENT.DATE GE "2-9-04"STONPHSAVE-LIST ARLISTPHGET-LIST 
  ARLISTSTONH