Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SLOVED]how to use &LINES ?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SLOVED]how to use &LINES ?
 Login/Join
 
Gold member
posted
when i try to this

  

ENGINE SQLMSS SET DEFAULT_CONNECTION CON01
SQL SQLMSS PREPARE SQLOUT FOR
SELECT * from table where field_flag='Y1';
END
-RUN
-IF &LINES EQ 0 GOTO MSG;

TABLE FILE SQLOUT
PRINT *
END
-RUN

-*-SET &LINES=0;
SQL SQLMSS PREPARE SQLOUT FOR
SELECT * from table where field_flag='Y2';
END
-RUN
-IF &LINES  GOTO MSG;

TABLE FILE SQLOUT
PRINT *
END
-RUN


-MSG




if the 1st select result count > 1 and the 2nd select result count =0,
the top code(the 2nd &LINES always >1 ) ,if I SET &LINES=0 , the 2nd &LINES always =0 ,
how can i get the &LINES well?

Thanks,
James

This message has been edited. Last edited by: Yangyang,


WebFOCUS 7.6.8
WebFOCUS 7.6.10
BI
FLEX
.NET
 
Posts: 97 | Registered: August 18, 2009Report This Post
Expert
posted Hide Post
My guess is that &LINES is not being set if there are 0 records returned from the second SELECT.

Whats also interesting is that I always get 0, and only get &LINES set if I don'y use PREPARE SQLOUT FOR.

-*new file
-SET &ECHO=ALL;

SQL SQLMSS
SELECT * FROM sys.all_objects
WHERE name LIKE 'all%' ;
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS TMP_OUT
END
-RUN
-TYPE 1st LINES: &LINES

-RUN
-IF &LINES EQ 0 GOTO MSG;

-*TABLE FILE TMP_OUT
-*PRINT *
-*END
-*-RUN

SQL SQLMSS PREPARE SQLOUT FOR
SELECT * FROM sys.all_objects
WHERE name LIKE 'ALL%' ;
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS TMP_OUT2
END
-RUN
-TYPE 2nd LINES: &LINES
-IF &LINES GT 0 GOTO MSG;

-*TABLE FILE SQLOUT
-*PRINT *
-*END
-*-RUN

-MSG


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
thanks Waz,
I try to do this , It's work Smiler

you mean put the -IF &LINES GT 0 GOTO MSG;

before the below code ?

TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS TMP_OUT2
END
-RUN

Thanks,
James


WebFOCUS 7.6.8
WebFOCUS 7.6.10
BI
FLEX
.NET
 
Posts: 97 | Registered: August 18, 2009Report This Post
Expert
posted Hide Post
quote:
you mean put the -IF &LINES GT 0 GOTO MSG


Its jsut left over from my initial testing.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
thanks Waz Smiler


WebFOCUS 7.6.8
WebFOCUS 7.6.10
BI
FLEX
.NET
 
Posts: 97 | Registered: August 18, 2009Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SLOVED]how to use &LINES ?

Copyright © 1996-2020 Information Builders