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] Best way to dump an sql table to a DB2 file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Best way to dump an sql table to a DB2 file
 Login/Join
 
Silver Member
posted
Does anyone know a way to dump an SQL file to a DB2 file. I am new, so there is probably a 1000 way right?

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


WebFOCUS 7.7.03M
OS/400 and the client is Win7
 
Posts: 37 | Registered: October 21, 2009Report This Post
Virtuoso
posted Hide Post
Use "Data Migrator" ... very easy.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Virtuoso
posted Hide Post
very easy - if you already have Data Migrator with a read/write adapter for DB2 AND for SQL. If not, it's also very expensive.

Are you looking for a WebFOCUS solution? Are you already licensed for both adapters?


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Silver Member
posted Hide Post
we do not have data migrator Frowner


WebFOCUS 7.7.03M
OS/400 and the client is Win7
 
Posts: 37 | Registered: October 21, 2009Report This Post
Expert
posted Hide Post
quote:
SQL file to a DB2 file


What do you mean by a "SQL file" and a "DB2 file"?

If you want to load a DB2 table from a flat file or another DB2 table, have you tried using a DB2 client from IBM, or AQT or Toad or something similar? You can also use the WebFOCUS MODIFY command. This is as long as you have a user ID with update access.


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
Silver Member
posted Hide Post
I would like to dump the data from an SQl table to a DB2 file. Off the SQL server and on to the iseries. Or if I can just get the table off the SQL server and on to the IFS that would be fine also. Just not too fimiliar with the IBI tool set.


WebFOCUS 7.7.03M
OS/400 and the client is Win7
 
Posts: 37 | Registered: October 21, 2009Report This Post
Expert
posted Hide Post
If you have WebFOCUS adapters for the MS SQL Server database and the IBM DB2 database, you can easily use WebFOCUS to transfer data between the two platforms.

This is the general, overly simplified code:
TABLE FILE MS_SQL_SERVER_TABLE
PRINT *
ON TABLE HOLD AS H001
END

MODIFY FILE IBM_DB2_TABLE
FIXFORM FROM H001
DATA ON H001
END


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
Guru
posted Hide Post
You might be able to export the sql table directly to db2 file inside your sql server if you have somekind of odbc driver. We have the iSeries client access installed in the sql server pc to make it work.

Hua


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Report This Post
Member
posted Hide Post
quote:
Please Wait. Your request is being processed...
Logout: Focal Point
Update LiveCloud Account Reply

I have Client Access ODBC adapter installed - how do you dump a file onto the AS/400 via this driver? Does nything have to be done on the AS/400


Webfocus 7.1, Microsoft
Output: HTML
 
Posts: 8 | Location: South Africa | Registered: November 29, 2007Report This Post
Master
posted Hide Post
You can do this with Maintain in 4 lines of code:

MAINTAIN FILE fileA and fileB
For all next FileA.fields into stk
For all include FileB.fields from stk
END

Where fields represent the key field(s).

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Member
posted Hide Post
Can anyone tell me why this does not work?
THE DEFAULT CONNECTION IS TO AN AS/400 DATASOURCE. THE TABLE SDTSPLT IS AN AS/400 PHYSICAL FILE. I do not have a DB2 adapter - I am trying to write to an AS/400 file.



ENGINE SQLODBC SET DEFAULT_CONNECTION QGPL
SQL SQLODBC
DROP TABLE SDTSPLT;
END

DEFINE FILE ACTUAL1
DOC/A6='123456';
VALN/A6='N10A';
END
TABLE FILE ACTUAL1
PRINT DOC AS 'DOC'
BY VALN AS 'VALN'
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS SDTS1 FORMAT ALPHA
END
-RUN

TABLE FILE SDTS1
SUM DOC AS 'DOC'
BY VALN AS 'VALN'
ON TABLE HOLD AS SDTSPLT FORMAT SQLODBC
END


Webfocus 7.1, Microsoft
Output: HTML
 
Posts: 8 | Location: South Africa | Registered: November 29, 2007Report This Post
Virtuoso
posted Hide Post
PL,
Two things:
1. please let us know if there is any error somewhere along the line that might be pointing to the source of the problem.
2. make sure that the odbc connector you're using supports writing to the file - not all odbc's do that.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Member
posted Hide Post
quote:
let us know if there is any error somewhere along the line that might be pointing to the source of the problem

The error message received as follows;
0 NUMBER OF RECORDS IN TABLE= 634 LINES= 82
0 NUMBER OF RECORDS IN TABLE= 82 LINES= 6
0 HOLDING SQLODBC FILE...
(FOC1400) SQLCODE IS -601 (HEX: FFFFFDA7) XOPEN: 42S01
: [S0001] [IBM][Client Access Express ODBC Driver (32-bit)][DB2/400 SQL]SQ
: L0601 - SDTSPLT in QGPL type *FILE already exists.
(FOC1414) EXECUTE IMMEDIATE ERROR.


Webfocus 7.1, Microsoft
Output: HTML
 
Posts: 8 | Location: South Africa | Registered: November 29, 2007Report This Post
Member
posted Hide Post
Using Client Acess ODBC Diver 32 bit


Webfocus 7.1, Microsoft
Output: HTML
 
Posts: 8 | Location: South Africa | Registered: November 29, 2007Report 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] Best way to dump an sql table to a DB2 file

Copyright © 1996-2020 Information Builders