Title: [UD] Determining if list exists

I'm not sure if this is what your looking for, but here goes.

Insert the statement IF # S GO 99 after the initial SELECT statement. If no items are selected, then the proc proceeds to label 99 which displays a message and exists the proc. This prevents the situation where you end up printing all transactions, if no items selected.

HSSELECT AR WITH PAYMENT.DATE GE "2-9-04"
STON
H<
P
IF # S GO 99
HSAVE-LIST ARLIST

P
HGET-LIST ARLIST
STON
H<
PH
HLIST AR PAYMENT.DATE LPTR
X+
99 C
ONo Items Selected

X+

Regards,  Ian Renfrew

----- Original Message -----

Sent: Tuesday, February 03, 2004 8:51 AM
Subject: [UD] Determining if list exists

Is there a Unidata or Uniquery command that tells you if a select list exists?  In UniBasic I can use a SelectInfo function to determine if a list 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 is something to return from the selection criteria.  However, if nothing is selected in the SELECT statement (like the one below would if we ran it today), the PROC does what it is told and lists the whole file, since it is never given a list, resulting in a huge printout of every AR transaction.

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

Thanks for any suggestions you can give.

Chris


_______________________________________________
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

Reply via email to