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     New Focus Data Source

Read-Only Read-Only Topic
Go
Search
Notify
Tools
New Focus Data Source
 Login/Join
 
Master
posted
Hi,
I'm trying to create a new focus data source to hold the data about who ran the report. Later I can query this datasource to check how many users use this report.

my code is look like this,
-DEFAULT &USERID = 0;
-DEFAULT &NTUSERID = 'Default';
-DEFAULT &USERNAME = 'Default User';
-DEFAULT &RPTNUMBER = 'RPT_USAGE';
-DEFAULT &RPTDESC = 'Default Report';
-DEFAULT &DISPFORMAT = 'HTML';


TABLE FILE RPT_USERS
PRINT USER_NAME
NTUSERID
WHERE NTUSERID EQ '&USERID'
ON TABLE SAVE AS SAVEU1
END
-RUN
-READ SAVEU1 &USERNAME.A100. &NTUSERID.A30.
-RUN

USE CLEAR
END

USE C:\IBI\APPS\TEST\RPTUSRDAT.FOC AS RPTUSRDAT NEW
END
CREATE FILE RPTUSRDAT
-*END


MODIFY FILE RPTUSRDAT
COMPUTE DUMMY/A1=;
COMPUTE CUR_DT_TM/HYYMDS = HGETC(10,CUR_DT_TM);
COMPUTE RECORD_ID/HYYMDm = HGETC(10, 'HYYMDm');
COMPUTE DBUSER_ID/A30 = '&USERID';
COMPUTE NTUSER_ID/A30 = '&NTUSERID';
COMPUTE USER_NAME/A100 = '&USERNAME';
COMPUTE REPORT_NUMBER/A15 = '&RPTNUMBER';
COMPUTE REPORT_DESC/A100 = '&RPTDESC';
COMPUTE RUN_DATE/YYMD = HDATE(CUR_DT_TM, 'YYMD');
COMPUTE RUN_TIME/HHIS = CUR_DT_TM;
COMPUTE DISPLAY_FORMAT/A5 = '&DISPFORMAT';
MATCH RECORD_ID
ON NOMATCH INCLUDE

FIXFORM DUMMY/1

DATA
1
END

USE CLEAR
END
-RUN

but it's giving me error

(FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: RPTUSRDAT
BYPASSING TO END OF COMMAND

Not sure, where I'm missing. Can anyone helpme out in solve this issue?


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Guru
posted Hide Post
It may be just that, can't find your master.
Try adding this to your code and see what Focus returns.

WHENCE RPTUSRDAT MASTER
-RUN

or

You may need to add an

APP PREPENDPATH masterdirectory

also.



WebFOCUS 7.6.6/TomCat/Win2k3
 
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003Report This Post
Master
posted Hide Post
I have the master file created already. When I run the WHENCE command, it shows me the correct directory.

Now modified my code like this,

USE ADD C:\IBI\APPS\TEST\RPTUSRDAT.FOC AS RPTUSRDAT
END


MODIFY FILE RPTUSRDAT
COMPUTE DUMMY/A1=;
COMPUTE CUR_DT_TM/HYYMDS = HGETC(10,CUR_DT_TM);
COMPUTE RECORD_ID/HYYMDm = HGETC(10, 'HYYMDm');
COMPUTE DBUSER_ID/A30 = '&USERID';
COMPUTE NTUSER_ID/A30 = '&NTUSERID';
COMPUTE USER_NAME/A100 = '&USERNAME';
COMPUTE REPORT_NUMBER/A15 = '&RPTNUMBER';
COMPUTE REPORT_DESC/A100 = '&RPTDESC';
COMPUTE RUN_DATE/YYMD = HDATE(CUR_DT_TM, 'YYMD');
COMPUTE RUN_TIME/HHIS = CUR_DT_TM;
COMPUTE DISPLAY_FORMAT/A5 = '&DISPFORMAT';
MATCH RECORD_ID
ON NOMATCH INCLUDE

FIXFORM DUMMY/1

DATA
1
END

USE CLEAR
END
-RUN

this one throwing me error like
(FOC036) NO DATA FOUND FOR THE FOCUS FILE NAMED: C:\IBI\APPS\TEST\RPTUSRDAT.FOC
0 TRANSACTIONS: TOTAL = 1 ACCEPTED= 1 REJECTED= 0
SEGMENTS: INPUT = 1 UPDATED = 0 DELETED = 0


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Guru
posted Hide Post
is this an existing database?

If not, you need to issue

CREATE FILE RPTUSRDAT
-RUN

first time only. Otherwise it will wipe out your data each time. Do this before the modify.

Carol



WebFOCUS 7.6.6/TomCat/Win2k3
 
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003Report This Post
Master
posted Hide Post
Tried that, still getting the same error and not seeing that Foc file in that directory.


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Guru
posted Hide Post
I forgot, after I have

APP PREPENDPATH directoryname
APP HOLD directoryname

The APP HOLD tells Focus where to put your files.

You don't need the AS name in the USE statement either.

Try the APP HOLD and see what happens.



WebFOCUS 7.6.6/TomCat/Win2k3
 
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003Report This Post
Master
posted Hide Post
Tried with your suggestion but it fails. Here is my code,

USE ADD C:\IBI\APPS\TEST\RPTUSRDAT.FOC
END

APP HOLD C:\IBI\APPS\TEST\RPTUSRDAT.FOC

MODIFY FILE RPTUSRDAT
..
..
END


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Master
posted Hide Post
finally it worked, the problem was with the directory.
Thanks Carol for your help.


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Expert
posted Hide Post
To negate the need to use APP HOLD to force WF to put your Focus file where you want it, use the NEW parameter of the USE statement the first time that you create the file -

USE ADD C:\IBI\APPS\TEST\RPTUSRDAT.FOC NEW
END
CREATE FILE RPTUSRDAT
-RUN

Once you have the file created in the location that you require it, then revert to the previous USE -

USE ADD C:\IBI\APPS\TEST\RPTUSRDAT.FOC
END

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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     New Focus Data Source

Copyright © 1996-2020 Information Builders