Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Enform Query

766 views
Skip to first unread message

Sumit Varshney

unread,
Jul 1, 2002, 5:55:34 PM7/1/02
to
Hi,
I am writing an Enform Query which is resulting in lots of Blank Lines.
Is there a way in Enform to stop it from printing a blank line?
Sumit

RS

unread,
Jul 2, 2002, 9:07:15 AM7/2/02
to
sumit_v...@hotmail.com (Sumit Varshney) wrote in message news:<adf49f26.02070...@posting.google.com>...

Sumit,

You would get a much better response if you posted your Enform query
so that people could have a look.

Sumit Varshney

unread,
Jul 2, 2002, 5:15:05 PM7/2/02
to
Here is what I am trying to do:

declare cntnum;
set cntnum to 0;
list
by TERM.TERM-ID NOPRINT,
cntnum := count (CRD.CARD.CRD-NUM OVER TERM.TERM-ID) NOPRINT,
(if cntnum >= 10 then TERM.TERM-ID ELSE BLANK),
(if cntnum >= 10 then cntnum ELSE BLANK),
WHERE
auth.typ = 420
NOHEAD ALL;

To explain: I want to count the cards that have an AUTH.TYP = "420"
and then print TERM.TERM-ID and COUNT only for those that have count
greater then 9. I even tried SUPPRESS but it only suppresses "cntnum"
and still prints the TERM.TERM-ID on the line.

Let me know if I should change the query to get the desired results or
else a way around it....

Thanks in advance,
Sumit

Paul (Telus)

unread,
Jul 11, 2002, 4:40:32 AM7/11/02
to
Use the Before Change verb and If to accomplish your task like so:

declare cntnum INTERNAL I9;
set cntnum to 0;

list
by TERM.TERM-ID NOPRINT,
cntnum := (if auth.type = 420 then
cntnum + 1
else 0) NOPRINT,

before change TERM.TERM-ID
PRINT
TERM.TERM-ID ","
(if cntnum > 9 then cntnum ELSE 0)
;

This will summarize the count for each TERM-ID and resulted in fewer blank
lines. At each change of TERM-ID, cntnum with a value of 9 or less will
print a zero instead.

The "," that separates the TERM-ID and cntnum is to make it easier to import
the resulting spooler report into a spreadsheet as comma separated value.
Once imported into a spreadsheet, you can sort and filter as you like.

Hope this will work for you.
Paul

"Sumit Varshney" <sumit_v...@hotmail.com> wrote in message
news:adf49f26.02070...@posting.google.com...

abhira...@gmail.com

unread,
Dec 21, 2012, 1:01:44 AM12/21/12
to
Hello

can somebody help on below query


i want list of records which is contains double space in two words in one column. ie:

LOCATION
----------------
SOUTH AFRICA
SAUDI ARABIA
NEW ZEALAND


In above example Location is column which contains location.
i want a record which is contains double space like (SOUTH AFRICA)
or ( NEW ZEALAND). In mentioned records contains 2 space. I want only that records and all remain should not be display.

kindly replay on my mail id
abhira...@yahooo.co.in or abhira...@gmail.com


Keith Dick

unread,
Dec 21, 2012, 2:58:25 AM12/21/12
to abhira...@gmail.com
The only approach I can think of is a bit awkward:

LIST ... WHERE LOCATION IS [1,20 " A" 0,20] OR LOCATION IS [1,20 " B" 0,20] OR ... OR LOCATION IS [1,20 " Z" 0,20]

or perhaps the slightly shorter:

LIST ... WHERE LOCATION IS [- " A" -] OR LOCATION IS [- " B" -] OR ... OR LOCATION IS [- " Z" -]

You can look up the meaning of those patterns in the ENFORM Plus manual in chapter 3 under "Logical Expressions". The "-" matches any number, including 0, characters, the " A" matches itself, and the 1,20 matches 1 through 20 of any characters (I picked 20 arbitrarily as about the maximum size of your field; increase it if your field is much longer). This will not exclude a field that has a single word with leading spaces, so if your data has some fields like that, this approach won't help. The above also assumes the second word starts with a capital letter. You'd have to double the number of expressions to also handle lower case letters following the space. The above would match a three word country name, too, if that matters.

If you were using SQL/MP (but not SQL/MX), I believe you could create a collation that treated each pair " A", " B", etc. as a different rank than all single characters, and then the WHERE clause would be a single expression.

Keith Dick

unread,
Dec 21, 2012, 3:06:53 AM12/21/12
to abhira...@gmail.com
I forgot to say that I have never used those kinds of patterns in ENFORM. The above is based just on what I read about them in the manual. Also, I don't know whether ENFORM allows a command to be long enough to write all 26 terms in that logical expression.

Keith Dick

unread,
Dec 21, 2012, 3:12:29 AM12/21/12
to
Oh, and reading it again, I see that I answered the wrong question (too early in the morning for me, I guess).

I think to select only the records with two spaces between names or before the first name, you would just modify what I wrote to make the literals contain two leading spaces:

wbreidbach

unread,
Dec 21, 2012, 3:35:15 AM12/21/12
to kd...@acm.org
I am not the Enform guru but may be there is another way. As far as I understand you want to find all those records, probably to correct them. So you would need a tool to find those records. There 2 chances:
Convert the file to a type 101 file and use EDIT or TEDIT to do a search. Depending on the size of the records or the file this might not be possible.
Another chance is using the BROWSER tool which is available from the YAHOO group which is able to process every NonStop and OSS file.

wbreidbach

unread,
Dec 21, 2012, 4:06:16 AM12/21/12
to kd...@acm.org
Oops, wrong post

Doug Miller

unread,
Dec 21, 2012, 10:55:07 AM12/21/12
to
Keith Dick <kd...@acm.org> wrote in news:50D4189D...@acm.org:

>Also, I don't know whether ENFORM allows a command to be long enough to write all 26
terms in that logical expression.
>

It does not.

Keith Dick

unread,
Dec 21, 2012, 11:12:04 AM12/21/12
to
Thanks, Doug. I was afraid Enform had a short command length limit.

My next suggestion would be to create a SQL/MP table that matches the Enscribe data, do a SQLCI LOAD from the Enscribe file into the SQL/MP table, and have at it with some of the facilities SQL/MP provides. A collation might do the trick, but I'm not sure it can express three-character logical characters.

Or just write a simple COBOL or TAL program to read the Enscribe file and examine the field in question, as I think Wolfgang suggested. It would not have to be a very complex program, just to look at the fields and print the key and maybe a few other fields of records that have the problem.

Anupam Das

unread,
Dec 21, 2012, 1:10:58 PM12/21/12
to kd...@acm.org
>> My next suggestion would be to create a SQL/MP table that matches the Enscribe data, do a SQLCI LOAD from the Enscribe file into the SQL/MP table, and have at it with some of the facilities SQL/MP provides. <<

I was wondering a situation if the customer realizes that he does not have SQL/MP in his Tandem machine as his application never needed that. One good example may be B24 Payment processing solution. What they would be doing in that case?

Here is the answer if I remember correctly what I heard from someone who belongs to NonStop sales, he says, NonStop SQL/MP is a must software for any Tandem machine. Reason being, the DSM/SCM software does not function without SQL/MP being initialized on that node. But it seems, HP strongly says not to use that software for general purposes if that customer never placed an order for NonStop SQL software.

Abhiraj Swami

unread,
Dec 27, 2012, 7:51:33 AM12/27/12
to
Hi friends

Is there any tag for displaying number from 1 to ... using enform


for example ..
in below example count field is not available in my DDL but i want to display
it.


I want to display no such as

Count F-Name L-name
----- ------- ---------
1 Sachin Tendulkar
2 Rajni Kant
3 Abhiraj Swami
4 Nikhil Tare
. Bhushan Dalvi
. ... ....
500
...
...
...
5000
....
10000

Doug Miller

unread,
Dec 27, 2012, 10:40:07 AM12/27/12
to
Abhiraj Swami <abhira...@gmail.com> wrote in news:81ee3b0a-f9ef-4bd1-b356-
ca2c0d...@googlegroups.com:

> Hi friends
>
> Is there any tag for displaying number from 1 to ... using enform

No.

The system variable @LINENO gives you the line number within each page, but it resets to
1 at the beginning of a new page.

This *might* do what you want. It's untested, so use at your own risk:

LIST ((@PAGENO - 1) * @LINES + @LINENO) AS I5 HEADING "Count", ...
0 new messages