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] IMS database joins in WF

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] IMS database joins in WF
 Login/Join
 
Master
posted
Hai all..

I am working on a report where the databases are IMS on mainframe. I am trying to join 2 tables but the report keeps running with no output.

Should we special any different approach for IMS databases as they are hierarchical?

Any suggestions appreciated.
I can provide more details if needed..

Thanks..

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


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Expert
posted Hide Post
You have to make sure the JOINs are efficient.

If you're using WebFOCUS, you can turn SQL traces on to see the SQL generated by WebFOCUS, along with any relevant messages from the SQL translator.

(Always add this at the top of your code if you're accessing DBMS tables:

-*-- Set up SQL tracing - as provided by Francis Mariani on FocalPoint ---------

-*-- Deactivate SQL tracing --------------------------------
SET TRACEOFF = ALL

-*-- Show Commands and data exchange between the -----------
-*-- physical and the logical layers of the data adapter
-*SET TRACEON = SQLCALL

-*-- Enable Trace for the SQL Translator -------------------
SET TRACEON = SQLTRANS

-*-- Show SQL statements -----------------------------------
SET TRACEON = STMTRACE//CLIENT

-*-- Show Optimization information -------------------------
SET TRACEON = SQLAGGR//CLIENT

-*-- Show SQL generated statement trace --------------------
-*SET TRACEON = STMTRACE/1/CLIENT

-*-- Show SQL generated sub-statement trace ----------------
-*SET TRACEON = STMTRACE/2/CLIENT

-*-- Disable the trace stamp (Date/Time etc) ---------------
SET TRACESTAMP = OFF

-*-- Set trace line wrapping - # of characters -------------
SET TRACEWRAP = 78

-*-- Activate SQL tracing ----------------------------------
SET TRACEUSER = ON
-RUN

(Leave the commented lines in comments as these trace statements generate a lot on unnecessary lines)


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Also add
SET XRETRIEVAL=OFF
just before your TABLE FILE and leave it there until you have made the code efficient. This command "previews the format of a report without actually accessing any data".


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
And remember, IMS is not an SQL-based data base. Is there a way to turn a trace on the backend (how are you getting to IMS or are you running a reporting server on the mainframe?). You really need to see what IMS is getting. Maybe your IMS DBA, also, could help you out.


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
Expert
posted Hide Post
quote:
IMS is not an SQL-based data base

Wow! It's been years (decades?) since I last worked with IMS, I didn't realize!


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Master
posted Hide Post
Thanks for replying Francis

It says Retrieval killed and 0 records..?!


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Expert
posted Hide Post
That's the result of the XRETRIEVAL=OFF - the request does not retrieve and data. If that's all you got, then it's because, as Ginny pointed out, IMS is not a SQL-based database.

BUT

According to the Adapter Administration for UNIX, Windows, OpenVMS, i5/OS, and z/OS, Version 7 Release 6.1 documentation,
quote:
You can issue any SQL request through the Adapter for IMS


Take a look at the above mentioned manual. There is some discussion of traces in IMS, but it does not seem to be SQL tracing. There are some optimization suggestions that might be interesting to look at.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Francis,

Yes, you can issue SQL for IMS, but it wont be passthru!

Enigma,

Can you get output from each IMS table (they were called segments)?

If you can, then does your JOIN command take into account:
quote:

when you join TO an IMS database, you must join to one of the
following:
· A key field or secondary index in the root segment (ALIAS= IMSname.KEY,
IMSname.HKY, or IMSname.SKY).
· The high-order portion of a key field or secondary index in the root segment

Look at the IMS interace pdf.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Master
posted Hide Post
I am able to get data from each tables but joins fail.
I guess I am writing joins in wrong way as I write for SQL databases (relational)


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Master
posted Hide Post
I am trying to join 2 IMS tables.
7 fields from each tables are used as join as said to me.

What could be the general format for joining these?(using segment name etc.)

I never worked on IMS. Spare me please..


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Expert
posted Hide Post
JOIN COL1 AND COL2 AND COL3 AND COL4 AND COL5 AND COL6 AND COL7 IN TBL1
  TO COL1 AND COL2 AND COL3 AND COL4 AND COL5 AND COL6 AND COL7 IN TBL2 AS J1
END

I think this should work.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
You also have to pay attention to what Danny said. Working with IMS is very tricky so it is imperative that you read the IMS Interface or adapter manual or the chapter in the Data Administration manual related to IMS. You need to be able to look at the setup for each file to make sure that the join can be done.

Or you can extract the data separately then do the join in WebFOCUS with your hold files.


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
Master
posted Hide Post
Francis, that is the normal way which is not working for this IMS database..


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Virtuoso
posted Hide Post
it seems a bit strange to me that you have to join on 7 fields. As far as I can recall, IMS did not deal with multiple field joins.
I think you should take a hard look at the masters of these 2 segments or maybe post them here.
If you still are stumped, could you go the way Ginny suggested: extract, hold and then join?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 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] IMS database joins in WF

Copyright © 1996-2020 Information Builders