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     APP HOLD -----Problem (Address Resolutio)

Read-Only Read-Only Topic
Go
Search
Notify
Tools
APP HOLD -----Problem (Address Resolutio)
 Login/Join
 
<delvegas>
posted
Hi

Unable to figure out the problem:- User enter's 2 Test ID. like &STestRequest(100),&CTestRequest (200) and process the request.

-SET &TestRequest = &STestRequest;
! mkdir /tmp/data
! mkdir /tmp/data/A&TestRequest
APP MAP HOLDIR /tmp/data/A&TestRequest
APP HOLD HOLDIR
FILEDEF B&TestRequest DISK /tmp/data/A&TestRequest/B&TestRequest...foc (
use
/tmp/data/A&TestRequest/B&TestRequest (database location)
END
-RUN
-* ----------------------------------------------first test Request
TABLE FILE B&TestRequest
SUM
COUNTRY
WHERE FK_ID EQ &TestRequest
END
-RUN

-IF &RECORDS EQ 0 THEN GOTO WARN1 ELSE WARN1;
"Message Data Exists- for first"
-WARN1
"Message NO Data Exists- for first"

-* ----------------------Problem for this part of code at setting path while processing 2nd request (&CTestRequest)

-SET &TestRequest = &CTestRequest;
APP HOLD
! mkdir /tmp/data
! mkdir /tmp/data/A&TestRequest
APP MAP HOLDIR /tmp/data/A&TestRequest
APP HOLD HOLDIR
FILEDEF B&TestRequest DISK /tmp/data/A&TestRequest/B&TestRequest...foc (
use
/tmp/data/A&TestRequest/B&TestRequest (database location)
END
-RUN
-*------------------------------------------------Second Test Request
TABLE FILE B&TestRequest
SUM
COUNTRY
WHERE FK_ID EQ &TestRequest
END
-RUN

-IF &RECORDS EQ 0 THEN GOTO WARN1 ELSE WARN2;
"Message Data Exists- for Second"
-WARN2
"Message NO Data Exists- for Second"
-EXIT
-------------------------------------------------

Problem is :- For the first test request code (say 100) code is working fine and displaying the message correctly, but for second Test Request (say 200).. It unable to locate to the file where database exists, and always display the message " NO Data Exists ", even though data exists.

ANY SUGGESTION IS APPRECIATED.
 
Report This Post
<Sean Williams>
posted
-IF &RECORDS EQ 0 THEN GOTO WARN1 ELSE WARN1;

if no records then WARN1 otherwise WARN1 anyway....

Is that right??
 
Report This Post
<delvegas>
posted
hi williams
The below is correct...
-IF &RECORDS EQ 0 THEN GOTO WARN2 ;

Any suggestions would be appreciated

delvee
 
Report This Post
Expert
posted Hide Post
I don't know if it has something to do with your GOTO's. I changed the GOTO statements slightly and the program seems to run through correctly:


-SET &ECHO=ALL;

-DEFAULT &STestRequest = '100';
-DEFAULT &CTestRequest = '200';

-SET &TestRequest = &STestRequest;
! mkdir /tmp/data
! mkdir /tmp/data/A&TestRequest
APP MAP HOLDIR /tmp/data/A&TestRequest
APP HOLD HOLDIR
FILEDEF B&TestRequest DISK /tmp/data/A&TestRequest/B&TestRequest...foc (
USE /tmp/data/A&TestRequest/B&TestRequest
END
-RUN
-* ----------------------------------------------first test Request
TABLE FILE B&TestRequest
SUM
COUNTRY
WHERE FK_ID EQ &TestRequest
END
-RUN

-IF &RECORDS EQ 0 THEN GOTO WARN1;
-TYPE "Message Data Exists- for first"
-WARN1
-TYPE "Message NO Data Exists- for first"

-SET &TestRequest = &CTestRequest;
APP HOLD
! mkdir /tmp/data
! mkdir /tmp/data/A&TestRequest
APP MAP HOLDIR /tmp/data/A&TestRequest
APP HOLD HOLDIR
FILEDEF B&TestRequest DISK /tmp/data/A&TestRequest/B&TestRequest...foc (
USE /tmp/data/A&TestRequest/B&TestRequest
END
-RUN
-*------------------------------------------------Second Test Request
TABLE FILE B&TestRequest
SUM
COUNTRY
WHERE FK_ID EQ &TestRequest
END
-RUN

-IF &RECORDS EQ 0 THEN GOTO WARN2;
-TYPE "Message Data Exists- for Second"
-WARN2
-TYPE "Message NO Data Exists- for Second"
-EXIT

This message has been edited. Last edited by: <Mabel>,
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report 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     APP HOLD -----Problem (Address Resolutio)

Copyright © 1996-2020 Information Builders