Acceessing DB2 UDB in AIX COBOL on unix


 
Thread Tools Search this Thread
Top Forums Programming Acceessing DB2 UDB in AIX COBOL on unix
# 1  
Old 10-20-2009
Acceessing DB2 UDB in AIX COBOL on unix

Hi ,

We are migrating our database from DB2 z/os to DB2 UDB on UNIX.
and cobol on mainframes to AIX cobol on UNIX.

We have some cobol Db2 programs that are accessing different Databases
how do we code such type of programs in AIX cobol.

Do we need to Establish connection for accessing Each Tables

e.g

Table1 under Database1
Table2 under Database2

While Accessing These tables
do we need to connect to

connect to Database1

Exec SQL
select from table1
End-Exec

connect to Database2

Exec SQL
select from table2
End-Exec

Is this correct way for programming.
Is there any alternate approach for doing this.

and how do we compile such cobol and execute DB2 Programs.

Thanks,
Satish
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

UNIX commad in COBOL

Hi guys, i used the call "sytem" using ... in a cobol program. At the moment i stoped at an empasse, how cam I retrive the execution's result of unix command? Explenation, I made an 'pwd' command, and I must to have the directory inside the program. How can have this result? (2 Replies)
Discussion started by: Prosy60
2 Replies

2. Shell Programming and Scripting

Unix Korn Shell script on Solaris to DB2 UDB LUW database

I am rather new to korn shell scripting and attempting to write a Unix script that would detach, attach a range partition table in DB2 UDB LUW database. This would be a job scheduled in control M that reads in an input file with 5 parameters passed to it from the application. I don't have much... (1 Reply)
Discussion started by: tjhanso
1 Replies

3. AIX

Urgent!! Debugging tool for cobol in AIX

hi folks, I am a new to Aix, i worked as sys admin so no idea about software probs, my software team requires Debugging tool for cobol in AIX machine. can someone tell me the tool and also the installation procedure for the same Please drag me out from this soon :confused: (1 Reply)
Discussion started by: atulgkwd
1 Replies

4. AIX

Ibm db2 udb

Am trying to export the content of Stored Procedure to a file using GET ROUTINE command. After executing the command first few lines of the file contains ASCII characters though i have original text following that. Any help is appreciated. (0 Replies)
Discussion started by: mvictorvijayan
0 Replies

5. Shell Programming and Scripting

Calling script from RM cobol and returning value to cobol

Is there a way you can return a value from a script that is called from a rm cobol program... 01 WS-COMD-LINE-PGM X(39) value sh ./getUserId.sh 12345" 01 WS-RETURN-SYS-CODE PIC 9(8). CALL "SYSTEM" USING WS-COMD-LINE-PGM GIVING WS-RETURN-SYS-CODE. ... (1 Reply)
Discussion started by: pavanmp
1 Replies

6. Programming

Seg Fault Running AIX COBOL program

Hi some help read............ I'm getting a segmentation fault when I run an AIX COBOL/Db2 program. I initiate the program from the command line, but it hangs, and then when I press enter it generates a segmantation fault and produces a core dump. The box is running AIX software level ... (5 Replies)
Discussion started by: steve_f
5 Replies

7. AIX

UDB 9.5 upgrade from 8.2 on AIX 5.3

We are going from UDB DPF 8.2 to 9.5 and changing HW from P4+ to P6 and moving from 5.2 to 5.3. Anyone out there gone through this upgrade? Any words of wisdom, warnings, or other gotchas you could pass on. TIA. ART (0 Replies)
Discussion started by: ArtF
0 Replies

8. AIX

IBM DB2 UDB to SQL Server 2005 Porting

Hi All, Am porting my application from AIX to Windows. As a part of this I need to port the Database in IBM DB2 UDB to SQL Server 2005. Is there any Guide/Doc/Article available on this? How to convert the stored procedures and physical data from DB2 to SQL Server 2005? Thanks in Advance (0 Replies)
Discussion started by: mvictorvijayan
0 Replies

9. Programming

cobol crn programme run on express cobol as .gnt

can i run .crn programme in express cobol which support to .gnt programme .... Plz tell me solution (2 Replies)
Discussion started by: bibi
2 Replies

10. UNIX for Dummies Questions & Answers

Cobol On Unix

Hi , Could anyone please tell me about the whole procedure for compiling, linking the cobol program on unix platform. As i am mainframe guy and very new to unix, any help will be very appriciated, Regards, -Vinit (2 Replies)
Discussion started by: vinit_cyberguy
2 Replies
Login or Register to Ask a Question
PDOSTATEMENT.ERRORINFO(3)						 1						 PDOSTATEMENT.ERRORINFO(3)

PDOStatement::errorInfo - Fetch extended error information associated with the last operation on the statement handle

SYNOPSIS
public array PDOStatement::errorInfo (void ) DESCRIPTION
RETURN VALUES
PDOStatement.errorInfo(3) returns an array of error information about the last operation performed by this statement handle. The array con- sists of the following fields: +--------+---------------------------------------------------+ |Element | | | | | | | Information | | | | +--------+---------------------------------------------------+ | 0 | | | | | | | SQLSTATE error code (a five characters alphanu- | | | meric identifier defined in the ANSI SQL stan- | | | dard). | | | | | 1 | | | | | | | Driver specific error code. | | | | | 2 | | | | | | | Driver specific error message. | | | | +--------+---------------------------------------------------+ EXAMPLES
Example #1 Displaying errorInfo() fields for a PDO_ODBC connection to a DB2 database <?php /* Provoke an error -- the BONES table does not exist */ $sth = $dbh->prepare('SELECT skull FROM bones'); $sth->execute(); echo " PDOStatement::errorInfo(): "; $arr = $sth->errorInfo(); print_r($arr); ?> The above example will output: PDOStatement::errorInfo(): Array ( [0] => 42S02 [1] => -204 [2] => [IBM][CLI Driver][DB2/LINUX] SQL0204N "DANIELS.BONES" is an undefined name. SQLSTATE=42704 ) SEE ALSO
PDO.errorCode(3), PDO.errorInfo(3), PDOStatement.errorCode(3). PHP Documentation Group PDOSTATEMENT.ERRORINFO(3)