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     [CLOSED] Shell Script to call fex procedure in Managed Reporting

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Shell Script to call fex procedure in Managed Reporting
 Login/Join
 
Member
posted
Hi,

I'm trying to write a shell script to call an fex file that is stored in a Managed Reporting environment and need some help. I've searched the forum but only found how to use Unix commands inside a fex file.

My environment is Unix Solaris on the Reporting Server (v7.6.7). I built the report using Developer Studio (7.6.7) in Standard Reports on a Domain in Managed Reporting.

My intention is to use the shell script to create Job Submission in Banner (basically the interface on submit, will launch a shell script to kick off a job and in this case I want the job to be a fex file by invoking the WFServlet). The user of the report can still run the report if they choose to via the MRE but we wanted to automate this in one environment so that the user does not have to move back and forth from the ERP system to WebFOCUS. The fex file generates pdf files for applicants to be viewed via our self-service portal. The fex works, I just need to figure out how to call the WFServlet from a Unix shell script and the parameters to pass to it.

Outside of figuring out the shell script, I have tried to invoke the servlet and pass parameters to run the report but I think I'm mixing MR variables and non-MR variables and I can't seem to find any documentation.

http: //servername:8080/ibi_apps/WFServlet?IBIF_ex=app%2frpt_by_banner_id.fex&IBIMR_folder=%23testpv38k4l1&IBIMR_domain=testdoma%2ftestdoma.htm&IBICFG_action=CFGGET&IBICFG_objtype=INSTALL_INFO%20HTTP/1.1&IBIWF_action=WF_SIGNON&IBIMR_ibuser=[username]&IBIMR_ibpass=[password]

Any help is appreciated with invoking the correct parameters for the servlet and also the shell script, even if it is to read something in the manual I have missed, a blog, something on the forum I missed ... anything.


Thanks,
Shantie.

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


________________________________________________________________________
WebFOCUS 7.7.03 | Client and Reporting Server OS: Linux Redhat | Client: Apache/Tomcat
Adapters: Oracle | Security: DBMS Security with password passthru
MRE Authentication: WFRS | Local: Developer Studio 7.7.03, MRE, Windows 7
Output: Excel, PDF, HTML
 
Posts: 23 | Location: New London | Registered: October 15, 2008Report This Post
Expert
posted Hide Post
If the client and reporting server are on the same platform, it is possible to do a UNIX 'link' from a directory in ibi/apps to the location of the focexec you want to run in basedir? You could then use one of the edastart subfunctions like -t or -x to execute the program from the reporting server and you wouldn't have to invoke the servlet.

What do you think?


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Member
posted Hide Post
Thank you for your reply Ginny. I'll talk to my System Administrator and try this. I'll let you know if it works out.

Shantie


________________________________________________________________________
WebFOCUS 7.7.03 | Client and Reporting Server OS: Linux Redhat | Client: Apache/Tomcat
Adapters: Oracle | Security: DBMS Security with password passthru
MRE Authentication: WFRS | Local: Developer Studio 7.7.03, MRE, Windows 7
Output: Excel, PDF, HTML
 
Posts: 23 | Location: New London | Registered: October 15, 2008Report This Post
Silver Member
posted Hide Post
Hi Shantie,

I've built something like that recently.
We do it the following way:

We have one Domain (ID: batchjob) including all batch-Job-Fex-files.

The second part is the OS-Specific batch.
You need a shell file and a t3i-File.
The t3i-file (Job.t3i) has the following content:

quote:

%connect
%begin
APP MAP batch_map 'X:\ibi\webfocus76\basedir\batchjob\app\'
APP APPENDPATH batch_map
EX START_JOB
%end
%disconnect
%stop_server


In the Batch-File you call the edastart with -f:

X:\ibi\srv76\wfs\bin\edastart.bat -f Job.t3i

In the domain batchjob you can place the START_JOB.fex where you can call the other procedures with EX.
Or you could place the code in there.

Regards,
Markus


WF 7.6.6 (MRE,BID, DevStudio, partly RC) on Windows 2003 /Apache/Tomcat
Output: HTML,Excel,PDF,PPT
Adapters: SQL Server, DB2, Oracle
 
Posts: 38 | Location: Austria, Linz | Registered: June 19, 2009Report This Post
<JG>
posted
Shantie, You're getting concepts mixed up a little.

You can't make a call to http://servername:8080/ibi_apps/WFServlet?IBIF_ex= from a unix shell script.

You need to use the method suggested by Ginny and Markus.
By creating the link as suggested by Ginny you would be running in the standard WebFOCUS environment
and would have no need to worry about the MRE side of things at all.
 
Report This Post
Member
posted Hide Post
Thanks JG. Markus, thank you for sharing the code snippets with me. I got as far as getting the shell script to work with the job.t3i. I need to pass the username and password to to the report since I am using DBMS Security and the password isn't passing properly to the Oracle database.

I did a search on the forum and found this from an old post from JG:

EX c:\ibi\apps\Proc.FEX &USER = 'ADMINISTRATOR'

So I used
EX rpt_by_banner_id &USER = 'USER'
in the job.t3i script, thinking that it would prompt for the password but it didn't. Is there anyway I can pass a password from a Unix variable?

This is a snippet of the job.t3o file:
SYSPRINT.SCR
(FOC1400) SQLCODE IS 1005 (HEX: 000003ED)
(FOC1394) CONNECT FAILURE
: ORA-01005: null password given; logon denied


Thanks again,
Shantie.

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


________________________________________________________________________
WebFOCUS 7.7.03 | Client and Reporting Server OS: Linux Redhat | Client: Apache/Tomcat
Adapters: Oracle | Security: DBMS Security with password passthru
MRE Authentication: WFRS | Local: Developer Studio 7.7.03, MRE, Windows 7
Output: Excel, PDF, HTML
 
Posts: 23 | Location: New London | Registered: October 15, 2008Report This Post
<JG>
posted
You need to add the connection string for the specific adapter instance in the focexec.

You should be able to just copy this from edasprof.prf

It is of the form

ENGINE SQLORA SET CONNECTION_ATTRIBUTES ConnectionName TNSName/userid,password

ConnectionName, TNSName, userid and password can all be passed as variables to make it dynamic.

ENGINE SQLORA SET CONNECTION_ATTRIBUTES &CONNAME.EVAL &TNS.EVAL/&USERID.EVAL,&PASSWORD.EVAL
 
Report This Post
Member
posted Hide Post
JG, this looks like a neat solution. I am a newbie to the FOCUS language. How do I pass the values dynamically to the focexec via the EX command?

I tried
EX rpt_by_banner_id &USERID=[USERID] &PASSWORD=[PASSWORD]
but this is not working. Can you point me to where I can find information about the EX command?

Also, I would prefer that the connection string comes from edaprof but with the added variables for the username and password. Is it possible to do this? The reason is that I want the connection to be used from what is in the ACX file for the synonyms behind the generation of the report - since we have TEST, PROD and DEV databases and the domains are set up with synonyms that have access files pointing to the relevant Oracle database and I wouldn't want another developer to change the connection string in the report and run it against PROD for instance when it should be running against TEST.

Do you need more details about our setup?


Thanks,
Shantie


________________________________________________________________________
WebFOCUS 7.7.03 | Client and Reporting Server OS: Linux Redhat | Client: Apache/Tomcat
Adapters: Oracle | Security: DBMS Security with password passthru
MRE Authentication: WFRS | Local: Developer Studio 7.7.03, MRE, Windows 7
Output: Excel, PDF, HTML
 
Posts: 23 | Location: New London | Registered: October 15, 2008Report This Post
Virtuoso
posted Hide Post
Try putting a comma between variables:

EX rpt_by_banner_id &USERID=[USERID],&PASSWORD=[PASSWORD]


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Member
posted Hide Post
It's still not passing ... As a test, I created another focexec with this one line of code

EX rpt_by_banner_id &USERID=[MYUSERID],&PASSWORD=[MYPASSWORD],&CONNAME=[MYCONN],&TNS=[MYTNS]

and the first line of code in rpt_by_banner_id.fex I have

ENGINE SQLORA SET CONNECTION_ATTRIBUTES &CONNAME.EVAL &TNS.EVAL/&USERID.EVAL,&PASSWORD.EVAL

When I run the new fex file in Managed Reporting in the same domain as rpt_by_banner_id, I get prompts for the amper variables from rpt_by_banner_id fex. So, I'm guessing that the passing of the variables via the EX command is not working. Am I off-track in my testing?


Shantie

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


________________________________________________________________________
WebFOCUS 7.7.03 | Client and Reporting Server OS: Linux Redhat | Client: Apache/Tomcat
Adapters: Oracle | Security: DBMS Security with password passthru
MRE Authentication: WFRS | Local: Developer Studio 7.7.03, MRE, Windows 7
Output: Excel, PDF, HTML
 
Posts: 23 | Location: New London | Registered: October 15, 2008Report This Post
Virtuoso
posted Hide Post
Sorry, I thought the ampersands could be included, but maybe not. Try your EX command without the ampersands:

EX rpt_by_banner_id USERID=[MYUSERID],PASSWORD=[MYPASSWORD],CONNAME=[MYCONN],TNS=[MYTNS]


If it continues to prompt you for the parameters when you run it, then review the properties for your focexec and make sure the "Prompt for Parameters" box is unchecked.

This message has been edited. Last edited by: Dan Satchell,


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Member
posted Hide Post
Hi Dan,

I removed the ampersands and having the EX command in a separate fex, named job.fex, works when I run job.fex in Managed Reporting in Dev Studio.

When I try running the t3i script, I am still getting the Oracle Error in the t3o file:

SYSPRINT.SCR
(FOC1400) SQLCODE IS 1005 (HEX: 000003ED)
(FOC1394) CONNECT FAILURE
: ORA-01005: null password given; logon denied

Contents of job.t3i:
%connect
%begin
APP MAP batch_map '/webFOCUS/ibi/wf767/ibi/WebFOCUS76/basedir/testdoma/app'
APP APPENDPATH batch_map
EX job
%end
%disconnect
%stop_server

Contents of job.fex:
EX rpt_by_banner_id USERID=[UserName],PASSWORD=[Password],CONNAME=TEST,TNS=[TNSName]

Beginning of rpt_by_banner_id.fex is:
ENGINE SQLORA SET CONNECTION_ATTRIBUTES &CONNAME.EVAL &TNS.EVAL/&USERID.EVAL,&PASSWORD.EVAL

Do you think this has something to do with the Oracle Adapter?

Markus, when you did your script that you shared with me, is your security DBMS security?

Do you think I should contact IBI TechSupport?


Thanks so much for all your help so far.
Shantie.


________________________________________________________________________
WebFOCUS 7.7.03 | Client and Reporting Server OS: Linux Redhat | Client: Apache/Tomcat
Adapters: Oracle | Security: DBMS Security with password passthru
MRE Authentication: WFRS | Local: Developer Studio 7.7.03, MRE, Windows 7
Output: Excel, PDF, HTML
 
Posts: 23 | Location: New London | Registered: October 15, 2008Report This Post
Virtuoso
posted Hide Post
Shantie,

Sorry but I am not familiar with the type of shell script you are trying to create. I would suggest copying the ORACLE connection string directly from your edasprof file and use it for testing (without the ampersand variables) until the connection is working without error, before putting the ampersand variables back in the code. Opening a case with IBI might also be a good idea because hopefully you would receive help from one of IBI's Oracle DBMS gurus.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Member
posted Hide Post
Thanks Dan no problem. At least I got as far as this.

I did as you suggested and put the connection string with the username and password hard coded in the fex file. I can run it via Dev Studio in Managed Reporting. But I am still getting the Oracle error when I run it using the Unix command line.

If anyone else has any ideas do let me know. I googled the Oracle error and found some obscure reference to character sets and SQL Net Plus. My oracle database character set is AL32UTF8.

I'll open a contact now with IBI TechSupport. If I get a solution I will post it here. If anyone else has any ideas let me know and I can try it.


Thanks,
Shantie


________________________________________________________________________
WebFOCUS 7.7.03 | Client and Reporting Server OS: Linux Redhat | Client: Apache/Tomcat
Adapters: Oracle | Security: DBMS Security with password passthru
MRE Authentication: WFRS | Local: Developer Studio 7.7.03, MRE, Windows 7
Output: Excel, PDF, HTML
 
Posts: 23 | Location: New London | Registered: October 15, 2008Report This Post
<JG>
posted
Shantie

take a look at this post

http://forums.informationbuild...971057331/m/43610405

The reason it will work via Dev Studio and MRE is that they call edasprof where as edastart does not

As mention in th above post, check that you are calling the correct acx file
 
Report This Post
Master
posted Hide Post
"The reason it will work via Dev Studio and MRE is that they call edasprof where as edastart does not"

I'm positive this is incorrect. I use edastart -f several hundred times a month and it uses the normal edasprof.

See my post here for how we do this:

Using edastart -f


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report 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     [CLOSED] Shell Script to call fex procedure in Managed Reporting

Copyright © 1996-2020 Information Builders