Re: [UD] Determining if list exists
I'm glad that the scrambled output buffers was not a psycho. Imagine what he would do in databasic. I worked at MCD when PQN came out and we got tricky as a PQ proc couldn't reference a PQN proc and vice versa. So you either changed all the procs or bounced the command off the MD. Since MCD didn't get PERFORM until around 1984-5, I got real good with PQN to the point of doing file read/writes, readnexts, iconv, oconv and multiple commands on the same line (saves the branching). A great improvement was being able to validate date answers using iconv instead of pattern matching as (2n/2n/2n) which 12/34/56 would be acceptable. For whatever reason, i really understood procs with all the buffers and user exits. Speaking as someone very versed in both F and A correlatives, i initially missed them with my UD clients. I did get the hang of simple I types and i don't think i will ever enjoy UD's version of stacking with I types. I like the OCONV(@ID,"T1,2") direct expressions and you'll probably never catch me writing the SUBS -IFS(-IFS ones as unfortunately all the examples i've seen in my clients are very hard to read and understand. One client had their system converted from Microdata to UD and there must have been a dict converter as it put the original 10 line dict on line 10 and built the appropriate 6 line dict. Unfortunately since the 10 line variety allows the false start of primary field, many converted dicts look like this: 002 F99; F1; F2;@[EMAIL PROTECTED] because the source dict had 002=99 and 008=A;F1+F2. Given the three choices to assign to 002 in a 10 line dict item, many earlier programmers fell into a bad habit of putting all of their calculating dict items either in 002=0 or 002=99. Once you reference a field in 008, it doesn't matter what's in 002. So the converter wrote the above 002 with the unnecessary F99. I do enjoy writing SUBR dict items as i try to make those subs usable by regular databasic programs as well. There are a bunch of things that i like doing in SUBR (UD/UV or D3) that you cannot do in any real dict item. Very handy. thanks - Original Message - From: [EMAIL PROTECTED] To: U2 Users Discussion List Sent: Thursday, February 05, 2004 1:23 PM Subject: Re: [UD] Determining if list exists Good Heavens, Mark, I think you kind of missed the tone of my post. :-) I see you sent it just before midnight, you must have been tired. I suppose after rereading my post in the light of a new day, you will see that I understand why the code I copied from a prior post was poorly written. (Don't believe in your wildest dreams, I would have written something like that.) And, as you are rereading my posting, you will also come to understand that the second proc was a joke based upon the poor understanding of procs by so many programmers. If you got the joke, you must understand something about proc. After 21 years in PICK, I know PQ procs and how to use them to best advantage. I have to admit PQN procs I have to look up syntax. I must admit, as much as I like procs, I don't use them much anymore. Now if only UniData would support F-correlatives... (Mark, that is another joke. :-) ) Take care, Bruce M Neylon Health Care Management Group "Mark Johnson" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 02/04/2004 11:52 PM Please respond to U2 Users Discussion List To:"U2 Users Discussion List" <[EMAIL PROTECTED]> cc: Subject:Re: Re: [UD] Determining if list exists 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 psy
Re: [UD] Determining if list exists
Good Heavens, Mark, I think you kind of missed the tone of my post. :-) I see you sent it just before midnight, you must have been tired. I suppose after rereading my post in the light of a new day, you will see that I understand why the code I copied from a prior post was poorly written. (Don't believe in your wildest dreams, I would have written something like that.) And, as you are rereading my posting, you will also come to understand that the second proc was a joke based upon the poor understanding of procs by so many programmers. If you got the joke, you must understand something about proc. After 21 years in PICK, I know PQ procs and how to use them to best advantage. I have to admit PQN procs I have to look up syntax. I must admit, as much as I like procs, I don't use them much anymore. Now if only UniData would support F-correlatives... (Mark, that is another joke. :-) ) Take care, Bruce M Neylon Health Care Management Group "Mark Johnson" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 02/04/2004 11:52 PM Please respond to U2 Users Discussion List To: "U2 Users Discussion List" <[EMAIL PROTECTED]> cc: Subject: Re: Re: [UD] Determining if list exists 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 -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
Re: Memo: Re: [UD] Determining if list exists
Do you mean like PRINTERR on UniData? PRINTERR 201:@FM:'JUNKFILE' displays [201] 'JUNKFILE' IS NOT A FILE NAME Bruce M Neylon Health Care Management Group "Mark Johnson" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 02/04/2004 10:36 PM Please respond to U2 Users Discussion List To: "U2 Users Discussion List" <[EMAIL PROTECTED]> cc: Subject: Re: Memo: Re: [UD] Determining if list exists I once worked on a UV (SCO/Dell Poweredge) that was ported from a MCD that had a lot of IF E = 401, IF E = 201 etc. Come to think of it, every TCL statement generates an ERRMSG. They're just not all errors. "100 items selected" is stored in ERRMSG. The ERRMSG dialect is evoked from the STOP databasic Statement. Does anyone know of any other way to evoke ERRMSG text. I've often wondered. -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
Re: Memo: Re: [UD] Determining if list exists
At 12:12 AM 02/05/2004, you wrote: [snipped] The same applies (here) with a BASIC program that : 0011 SENTENCE = \SELECT MD WITH F! "RUBBISH"\ 0012 EXECUTE SENTENCE CAPTURING JUNK RETURNING ERR In this case ERR = 0 if there's no items, not 401 under vanilla (R83, AP) Pick Unless.. Is there a UV Option (besides "Pick Flavo*u*r) that gives back a "401"?? Uh. No. Error messages in UV are generated from the SYS.MESSAGE file in a manner completely different (and incompatible with) Pick. The ERRMSG file within UV is there simply to support the STOPE/ABORTE BASIC commands. -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
Re: Memo: Re: [UD] Determining if list exists
I didn't test the 401 on UV but it was a very popular item on MCD's back in the day and i've got some UD that were clearly converted from MCD (Results) and they work there. So, i may hae jumped the gun trying to remember which is which. Also, maybe the flavor matters. I do recall an ex client with UV having a lot of E tests but i don't have any of it available at this time. Perhaps this indicates a need to be platform specific or to retire the concept as it's scattered. I just checked the ERRMSG file on a nearby D3 system and item 0 is for automatic testing. Perhaps the implementation moved some ERRMSG items around. 201 should be Filename? and 203 should be Itemname? 335 was the initial logon message. thanks. - Original Message - From: "Bruce Nichol" <[EMAIL PROTECTED]> To: "U2 Users Discussion List" <[EMAIL PROTECTED]> Sent: Thursday, February 05, 2004 12:12 AM Subject: Re: Memo: Re: [UD] Determining if list exists > Goo'day, > > Well I don't know..keep reading > > At 11:05 04/02/04, you wrote: > > >The E=401 is a test to see if a process generated an ERRMSG record, item-id > >of 401. The ERRMSG file had its own syntax of displaying the messages with > >the parameters, but i'm sure it's a long lost art. Sort of like RUNOFF and > >BATCH. GFE (Gone ForEver). > > > > Look at this: > > >CT MD U2.TEST > > U2.TEST > 0001 PQ > 0002 HSELECT MD WITH F1 "RUBBISH" > 0003 STON > 0004 P > 0005 IF E = 401 GO 10 > 0006 IF E = 0 GO 20 > 0007 HLIST MD F1 > 0008 P > 0009 G 99 > 0010 10 C > 0011 O 401 HIT! > 0012 G99 > 0013 20 C > 0014 O 0 HIT! > 0015 99 C > 0016 X > >U2.TEST > > 0 record(s) selected to SELECT list #0. > 0 HIT! > > > > As I said earlier (below), we had to replace all of *our* PROCS with "IF E > = 401"s with "IF E = 0 " to get them to work. > > The same applies (here) with a BASIC program that : > 0011 SENTENCE = \SELECT MD WITH F! "RUBBISH"\ > 0012 EXECUTE SENTENCE CAPTURING JUNK RETURNING ERR > > In this case ERR = 0 if there's no items, not 401 under vanilla (R83, AP) Pick > > Unless.. Is there a UV Option (besides "Pick Flavo*u*r) that gives back > a "401"?? > > > >- Original Message - > >From: "Bruce Nichol" <[EMAIL PROTECTED]> > >To: "U2 Users Discussion List" <[EMAIL PROTECTED]> > >Sent: Tuesday, February 03, 2004 6:34 PM > >Subject: RE: Memo: Re: [UD] Determining if list exists > > > > > > > Goo'day, > > > > > > Are you sure the "IF E = 401" bit works in UV? > > > > > > AFAIK, in UV, E = 0 if there are no items SELECTed, at least in Pick > >flavo*u*r. > > > > > > The "401" bit is vanilla Pick, which I remember we had to change on > > > conversion to UV back in 9.3???. > > > > > > Dunno about UD, though > > > > > > At 10:06 04/02/04, you wrote: > > > > > > >In a proc you would have: > > > >PQ > > > >HSELECT SOMEFILE SAMPLE 3 > > > >P > > > >IF E = 401 G 99 > > > >HLIST SOMEFILE > > > >P > > > >99 O No Items Selected > > > > > > > > > > > > > > > > > > > > > > > >__ > > > >Do you Yahoo!? > > > >Yahoo! SiteBuilder - Free web site building tool. Try it! > > > >http://webhosting.yahoo.com/ps/sb/ > > > >-- > > > >u2-users mailing list > > > >[EMAIL PROTECTED] > > > >http://www.oliver.com/mailman/listinfo/u2-users > > > > > > > > > > > > > > > >-- > > > >Incoming mail is certified Virus Free. > > > >Checked by AVG Anti-Virus (http://www.grisoft.com). > > > >Version: 7.0.211 / Virus Database: 261.8.1 - Release Date: 30/01/04 > > > > > > Regards, > > > > > > Bruce Nichol > > > Talon Computer Services > > > ALBURYNSW 2640 > > > Australia > > > > > > Tel: +61 (0)411149636 > > > Fax: +61 (0)260232119 > > > > > > If it ain't broke, fix it till it is! > > > > > > > > > -- > > > Outgoing mail is certified Virus Free. > > > Checked by AVG Anti-Virus (http://www.grisoft.com). > > > Version: 7.0.211 / Virus Database: 261.8.1 - Release Date: 30/01/04 > > > > > > > > > -- > > > 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 > > > > > > > >-- > >Incoming mail is certified Virus Free. > >Checked by AVG Anti-Virus (http://www.grisoft.com). > >Version: 7.0.211 / Virus Database: 261.8.2 - Release Date: 03/02/04 > > Regards, > > Bruce Nichol > Talon Computer Services > ALBURYNSW 2640 > Australia > > Tel: +61 (0)411149636 > Fax: +61 (0)260232119 > > If it ain't broke, fix it till it is! > > > -- > Outgoing mail is certified Virus Free. > Checked by AVG Anti-Virus (http://www.grisoft.com). > Version: 7.0.211 / Virus Database: 261.8.2 - Release Date: 03/02/04 > > > -- > 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: Memo: Re: [UD] Determining if list exists
Goo'day, Well I don't know..keep reading At 11:05 04/02/04, you wrote: The E=401 is a test to see if a process generated an ERRMSG record, item-id of 401. The ERRMSG file had its own syntax of displaying the messages with the parameters, but i'm sure it's a long lost art. Sort of like RUNOFF and BATCH. GFE (Gone ForEver). Look at this: >CT MD U2.TEST U2.TEST 0001 PQ 0002 HSELECT MD WITH F1 "RUBBISH" 0003 STON 0004 P 0005 IF E = 401 GO 10 0006 IF E = 0 GO 20 0007 HLIST MD F1 0008 P 0009 G 99 0010 10 C 0011 O 401 HIT! 0012 G99 0013 20 C 0014 O 0 HIT! 0015 99 C 0016 X >U2.TEST 0 record(s) selected to SELECT list #0. 0 HIT! > As I said earlier (below), we had to replace all of *our* PROCS with "IF E = 401"s with "IF E = 0 " to get them to work. The same applies (here) with a BASIC program that : 0011 SENTENCE = \SELECT MD WITH F! "RUBBISH"\ 0012 EXECUTE SENTENCE CAPTURING JUNK RETURNING ERR In this case ERR = 0 if there's no items, not 401 under vanilla (R83, AP) Pick Unless.. Is there a UV Option (besides "Pick Flavo*u*r) that gives back a "401"?? - Original Message - From: "Bruce Nichol" <[EMAIL PROTECTED]> To: "U2 Users Discussion List" <[EMAIL PROTECTED]> Sent: Tuesday, February 03, 2004 6:34 PM Subject: RE: Memo: Re: [UD] Determining if list exists > Goo'day, > > Are you sure the "IF E = 401" bit works in UV? > > AFAIK, in UV, E = 0 if there are no items SELECTed, at least in Pick flavo*u*r. > > The "401" bit is vanilla Pick, which I remember we had to change on > conversion to UV back in 9.3???. > > Dunno about UD, though > > At 10:06 04/02/04, you wrote: > > >In a proc you would have: > >PQ > >HSELECT SOMEFILE SAMPLE 3 > >P > >IF E = 401 G 99 > >HLIST SOMEFILE > >P > >99 O No Items Selected > > > > > > > > > > > >__ > >Do you Yahoo!? > >Yahoo! SiteBuilder - Free web site building tool. Try it! > >http://webhosting.yahoo.com/ps/sb/ > >-- > >u2-users mailing list > >[EMAIL PROTECTED] > >http://www.oliver.com/mailman/listinfo/u2-users > > > > > > > >-- > >Incoming mail is certified Virus Free. > >Checked by AVG Anti-Virus (http://www.grisoft.com). > >Version: 7.0.211 / Virus Database: 261.8.1 - Release Date: 30/01/04 > > Regards, > > Bruce Nichol > Talon Computer Services > ALBURYNSW 2640 > Australia > > Tel: +61 (0)411149636 > Fax: +61 (0)260232119 > > If it ain't broke, fix it till it is! > > > -- > Outgoing mail is certified Virus Free. > Checked by AVG Anti-Virus (http://www.grisoft.com). > Version: 7.0.211 / Virus Database: 261.8.1 - Release Date: 30/01/04 > > > -- > 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 -- Incoming mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.211 / Virus Database: 261.8.2 - Release Date: 03/02/04 Regards, Bruce Nichol Talon Computer Services ALBURYNSW 2640 Australia Tel: +61 (0)411149636 Fax: +61 (0)260232119 If it ain't broke, fix it till it is! -- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.211 / Virus Database: 261.8.2 - Release Date: 03/02/04 -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
Re: Re: [UD] Determining if list exists
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: Memo: Re: [UD] Determining if list exists
I once worked on a UV (SCO/Dell Poweredge) that was ported from a MCD that had a lot of IF E = 401, IF E = 201 etc. Come to think of it, every TCL statement generates an ERRMSG. They're just not all errors. "100 items selected" is stored in ERRMSG. The ERRMSG dialect is evoked from the STOP databasic Statement. Does anyone know of any other way to evoke ERRMSG text. I've often wondered. thanks. - Original Message - From: "Glenn Herbert" <[EMAIL PROTECTED]> To: "U2 Users Discussion List" <[EMAIL PROTECTED]> Sent: Wednesday, February 04, 2004 9:17 AM Subject: RE: Memo: Re: [UD] Determining if list exists > At 06:34 PM 02/03/2004, you wrote: > >Goo'day, > > > >Are you sure the "IF E = 401" bit works in UV? > > This would not work within UV unless proc had been rewritten > (doubtful). The error handling within uv is different and this is one of > those areas affected by that difference. You can only test IF E or IF #E. > > > >AFAIK, in UV, E = 0 if there are no items SELECTed, at least in Pick > >flavo*u*r. > > Yep. > > > >The "401" bit is vanilla Pick, which I remember we had to change on > >conversion to UV back in 9.3???. > > > >Dunno about UD, though > > > >At 10:06 04/02/04, you wrote: > > > >>In a proc you would have: > >>PQ > >>HSELECT SOMEFILE SAMPLE 3 > >>P > >>IF E = 401 G 99 > >>HLIST SOMEFILE > >>P > >>99 O No Items Selected > >> > >> > >> > >> > >> > >>__ > >>Do you Yahoo!? > >>Yahoo! SiteBuilder - Free web site building tool. Try it! > >>http://webhosting.yahoo.com/ps/sb/ > >>-- > >>u2-users mailing list > >>[EMAIL PROTECTED] > >>http://www.oliver.com/mailman/listinfo/u2-users > >> > >> > >> > >>-- > >>Incoming mail is certified Virus Free. > >>Checked by AVG Anti-Virus (http://www.grisoft.com). > >>Version: 7.0.211 / Virus Database: 261.8.1 - Release Date: 30/01/04 > > > >Regards, > > > >Bruce Nichol > >Talon Computer Services > >ALBURYNSW 2640 > >Australia > > > >Tel: +61 (0)411149636 > >Fax: +61 (0)260232119 > > > >If it ain't broke, fix it till it is! > > > >-- > >Outgoing mail is certified Virus Free. > >Checked by AVG Anti-Virus (http://www.grisoft.com). > >Version: 7.0.211 / Virus Database: 261.8.1 - Release Date: 30/01/04 > > > > > >-- > >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 -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
RE: [UD] Determining if list exists
Title: Message Hi Chris, Why not just use the 'REQUIRE.SELECT' or 'SELECT.ONLY' keywords in your query? This will then only run if there is a select list present. The Uniquery manual documents this quite well. 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 REQUIRE.SELECT LPTRSent by: [EMAIL PROTECTED] 02/03/2004 08:51 AM Please respond to U2 Users Discussion List To: <[EMAIL PROTECTED]> cc: Subject: [UD] Determining if list existsIs 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
Re: [UD] Determining if list exists
If you really need to save the list; HDELETE-LIST ARLIST PH HSSELECT AR WITH PAYMENT.DATE GE "2-9-04" STON HSAVE-LIST ARLIST PH IF # S G ERROR ROUTINE LABEL HGET-LIST ARLIST STON HLIST AR PAYMENT.DATE LPTR PH If you don't want an error routine, leave out the if # s. Bruce M Neylon Health Care Management Group "Chris Bugosh" <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 02/03/2004 08:51 AM Please respond to U2 Users Discussion List To: <[EMAIL PROTECTED]> cc: 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
Re: [UD] Determining if list exists
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" STONH
Re: Re: [UD] Determining if list exists
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
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
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
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: Memo: Re: [UD] Determining if list exists
I realize the context of the original reply was a PROC, but for the sake of completeness, you can also handle it within a paragraph. Check @SYSTEM.RETURN.CODE. SELECT SOMEFILE WITH F1 EQ "XYZ" IF @SYSTEM.RETURN.CODE LT 1 THEN GO NONE.SEL Tim Snyder IBM Data Management Solutions Consulting I/T Specialist , U2 Professional Services [EMAIL PROTECTED]-- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
RE: Memo: Re: [UD] Determining if list exists
At 06:34 PM 02/03/2004, you wrote: Goo'day, Are you sure the "IF E = 401" bit works in UV? This would not work within UV unless proc had been rewritten (doubtful). The error handling within uv is different and this is one of those areas affected by that difference. You can only test IF E or IF #E. AFAIK, in UV, E = 0 if there are no items SELECTed, at least in Pick flavo*u*r. Yep. The "401" bit is vanilla Pick, which I remember we had to change on conversion to UV back in 9.3???. Dunno about UD, though At 10:06 04/02/04, you wrote: In a proc you would have: PQ HSELECT SOMEFILE SAMPLE 3 P IF E = 401 G 99 HLIST SOMEFILE P 99 O No Items Selected __ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/ -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- Incoming mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.211 / Virus Database: 261.8.1 - Release Date: 30/01/04 Regards, Bruce Nichol Talon Computer Services ALBURYNSW 2640 Australia Tel: +61 (0)411149636 Fax: +61 (0)260232119 If it ain't broke, fix it till it is! -- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.211 / Virus Database: 261.8.1 - Release Date: 30/01/04 -- 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: Memo: Re: [UD] Determining if list exists
The E=401 is a test to see if a process generated an ERRMSG record, item-id of 401. The ERRMSG file had its own syntax of displaying the messages with the parameters, but i'm sure it's a long lost art. Sort of like RUNOFF and BATCH. GFE (Gone ForEver). - Original Message - From: "Bruce Nichol" <[EMAIL PROTECTED]> To: "U2 Users Discussion List" <[EMAIL PROTECTED]> Sent: Tuesday, February 03, 2004 6:34 PM Subject: RE: Memo: Re: [UD] Determining if list exists > Goo'day, > > Are you sure the "IF E = 401" bit works in UV? > > AFAIK, in UV, E = 0 if there are no items SELECTed, at least in Pick flavo*u*r. > > The "401" bit is vanilla Pick, which I remember we had to change on > conversion to UV back in 9.3???. > > Dunno about UD, though > > At 10:06 04/02/04, you wrote: > > >In a proc you would have: > >PQ > >HSELECT SOMEFILE SAMPLE 3 > >P > >IF E = 401 G 99 > >HLIST SOMEFILE > >P > >99 O No Items Selected > > > > > > > > > > > >__ > >Do you Yahoo!? > >Yahoo! SiteBuilder - Free web site building tool. Try it! > >http://webhosting.yahoo.com/ps/sb/ > >-- > >u2-users mailing list > >[EMAIL PROTECTED] > >http://www.oliver.com/mailman/listinfo/u2-users > > > > > > > >-- > >Incoming mail is certified Virus Free. > >Checked by AVG Anti-Virus (http://www.grisoft.com). > >Version: 7.0.211 / Virus Database: 261.8.1 - Release Date: 30/01/04 > > Regards, > > Bruce Nichol > Talon Computer Services > ALBURYNSW 2640 > Australia > > Tel: +61 (0)411149636 > Fax: +61 (0)260232119 > > If it ain't broke, fix it till it is! > > > -- > Outgoing mail is certified Virus Free. > Checked by AVG Anti-Virus (http://www.grisoft.com). > Version: 7.0.211 / Virus Database: 261.8.1 - Release Date: 30/01/04 > > > -- > 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: Memo: Re: [UD] Determining if list exists
Goo'day, Are you sure the "IF E = 401" bit works in UV? AFAIK, in UV, E = 0 if there are no items SELECTed, at least in Pick flavo*u*r. The "401" bit is vanilla Pick, which I remember we had to change on conversion to UV back in 9.3???. Dunno about UD, though At 10:06 04/02/04, you wrote: In a proc you would have: PQ HSELECT SOMEFILE SAMPLE 3 P IF E = 401 G 99 HLIST SOMEFILE P 99 O No Items Selected __ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/ -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users -- Incoming mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.211 / Virus Database: 261.8.1 - Release Date: 30/01/04 Regards, Bruce Nichol Talon Computer Services ALBURYNSW 2640 Australia Tel: +61 (0)411149636 Fax: +61 (0)260232119 If it ain't broke, fix it till it is! -- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.211 / Virus Database: 261.8.1 - Release Date: 30/01/04 -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
RE: Memo: Re: [UD] Determining if list exists
In a proc you would have: PQ HSELECT SOMEFILE SAMPLE 3 P IF E = 401 G 99 HLIST SOMEFILE P 99 O No Items Selected __ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/ -- u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
Re: Re: [UD] Determining if list exists
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 ARLISTSTONH<PHIF #S G 10HLIST AR PAYMENT.DATE LPTRP10 O No items Selectedthat should save a few trees.cheers,asvin"Chris Bugosh" <[EMAIL PROTECTED] on 03 Feb 2004 13:51Please respond to U2 Users Discussion List <[EMAIL PROTECTED]>Sent 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<PHHLIST AR PAYMENT.DATE LPTRPThanks for any suggestions you can give.Chris** This message originated from the Internet. Its originator may or may not be who they claim to be and the information contained in the message and any attachments may or may not be accurate.**(See attached file: C.htm)___u2-users mailing list[EMAIL PROTECTED]http://www.oliver.com/mailman/listinfo/u2-users HSBC Bank plc Registered Office: 8 Canada Square, London E14 5HQ Registered in England - Number 14259 Authorised and Regulated by the Financial Services Authority Member of the HSBC Bank marketing group. We sell life assurance, pensions and collective investment schemes and advise only on our own range of these products. _This transmission has been issued by a member of the HSBC Group "HSBC" for the information of the addressee only and should not be reproduced and / or distributed to any other person. Each page attached hereto must be read in conjunction with any disclaimer which forms part of it. Unless otherwise stated, this transmission is neither an offer nor the solicitation of an offer to sell or purchase any investment. Its contents are based on information obtained from sources believed to be reliable butHSBC makes no representation and accepts no responsibility or liability as to its completeness or accuracy. ___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: Memo: Re: [UD] Determining if list exists
Thanks. I couldn't get the IF S or IF #S to work, so I used Anthony Youngman's advice and used the REQUIRE.SELECT which worked fine. Also, Greenpeace will be glad to know that no trees were harmed in the creation of these reports. All printouts were held. Disk space however was used quite extensively since, when the criteria is met, this report is usually 191K but when it lists the whole file, it grows to 161MB. Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, February 03, 2004 9:02 AM To: U2 Users Discussion List 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 a proc 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" STON P HSAVE-LIST ARLIST P HGET-LIST ARLIST STON H< PH IF #S G 10 HLIST AR PAYMENT.DATE LPTR P 10 O No items Selected that should save a few trees. cheers, asvin "Chris Bugosh" <[EMAIL PROTECTED] on 03 Feb 2004 13:51 Please respond to U2 Users Discussion List <[EMAIL PROTECTED]> Sent by:[EMAIL PROTECTED] To:<[EMAIL PROTECTED]> cc: bcc: 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 ** This message originated from the Internet. Its originator may or may not be who they claim to be and the information contained in the message and any attachments may or may not be accurate. ** (See attached file: C.htm) ___ u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users HSBC Bank plc Registered Office: 8 Canada Square, London E14 5HQ Registered in England - Number 14259 Authorised and Regulated by the Financial Services Authority Member of the HSBC Bank marketing group. We sell life assurance, pensions and collective investment schemes and advise only on our own range of these products. _ This transmission has been issued by a member of the HSBC Group "HSBC" for the information of the addressee only and should not be reproduced and / or distributed to any other person. Each page attached hereto must be read in conjunction with any disclaimer which forms part of it. Unless otherwise stated, this transmission is neither an offer nor the solicitation of an offer to sell or purchase any investment. Its contents are based on information obtained from sources believed to be reliable but HSBC makes no representation and accepts no responsibility or liability as to its completeness or accuracy. ___ u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
RE: Memo: Re: [UD] Determining if list exists
There is also a keyword REQUIRE.SELECT ... Cheers, Wol -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: 03 February 2004 14:02 To: U2 Users Discussion List 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 a proc 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" STON P HSAVE-LIST ARLIST P HGET-LIST ARLIST STON H< PH IF #S G 10 HLIST AR PAYMENT.DATE LPTR P 10 O No items Selected that should save a few trees. cheers, asvin "Chris Bugosh" <[EMAIL PROTECTED] on 03 Feb 2004 13:51 Please respond to U2 Users Discussion List <[EMAIL PROTECTED]> Sent by:[EMAIL PROTECTED] To:<[EMAIL PROTECTED]> cc: bcc: 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 ** This message originated from the Internet. Its originator may or may not be who they claim to be and the information contained in the message and any attachments may or may not be accurate. ** (See attached file: C.htm) ___ u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users HSBC Bank plc Registered Office: 8 Canada Square, London E14 5HQ Registered in England - Number 14259 Authorised and Regulated by the Financial Services Authority Member of the HSBC Bank marketing group. We sell life assurance, pensions and collective investment schemes and advise only on our own range of these products. _ This transmission has been issued by a member of the HSBC Group "HSBC" for the information of the addressee only and should not be reproduced and / or distributed to any other person. Each page attached hereto must be read in conjunction with any disclaimer which forms part of it. Unless otherwise stated, this transmission is neither an offer nor the solicitation of an offer to sell or purchase any investment. Its contents are based on information obtained from sources believed to be reliable but HSBC makes no representation and accepts no responsibility or liability as to its completeness or accuracy. *** This transmission is intended for the named recipient only. It may contain private and confidential information. If this has come to you in error you must not act on anything disclosed in it, nor must you copy it, modify it, disseminate it in any way, or show it to anyone. Please e-mail the sender to inform us of the transmission error or telephone ECA International immediately and delete the e-mail from your information system. Telephone numbers for ECA International offices are: Sydney +61 (0)2 9911 7799, Hong Kong + 852 2121 2388, London +44 (0)20 7351 5000 and New York +1 212 582 2333. *** ___ u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users
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 a proc 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" STON P HSAVE-LIST ARLIST P HGET-LIST ARLIST STON H< PH IF #S G 10 HLIST AR PAYMENT.DATE LPTR P 10 O No items Selected that should save a few trees. cheers, asvin "Chris Bugosh" <[EMAIL PROTECTED] on 03 Feb 2004 13:51 Please respond to U2 Users Discussion List <[EMAIL PROTECTED]> Sent by:[EMAIL PROTECTED] To:<[EMAIL PROTECTED]> cc: bcc: 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 ** This message originated from the Internet. Its originator may or may not be who they claim to be and the information contained in the message and any attachments may or may not be accurate. ** (See attached file: C.htm) ___ u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users HSBC Bank plc Registered Office: 8 Canada Square, London E14 5HQ Registered in England - Number 14259 Authorised and Regulated by the Financial Services Authority Member of the HSBC Bank marketing group. We sell life assurance, pensions and collective investment schemes and advise only on our own range of these products. _ This transmission has been issued by a member of the HSBC Group "HSBC" for the information of the addressee only and should not be reproduced and / or distributed to any other person. Each page attached hereto must be read in conjunction with any disclaimer which forms part of it. Unless otherwise stated, this transmission is neither an offer nor the solicitation of an offer to sell or purchase any investment. Its contents are based on information obtained from sources believed to be reliable but HSBC makes no representation and accepts no responsibility or liability as to its completeness or accuracy. Title: [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 ** This message originated from the Internet. Its originator may or may not be who they claim to be and the information contained in the message and any attachments may or may not be accurate. ** ___ u2-users mailing list [EMAIL PROTECTED] http://www.oliver.com/mailman/listinfo/u2-users