[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1182
  • Last Modified:

Running an SQL script file in QSH

Hi there,

I'm trying to create a database in DB2 from within QShell using an sql script in a file. The command I'm using is:

db2 -Svtf mysqcript.sql

However, I get an error: UNABLE TO OPEN FILE: mysqcript.sql RC=3025

I guess this means it can't find my file.

Where in the IFS should I be storing the script file?

Cheers.
0
stevebeech
Asked:
stevebeech
  • 2
1 Solution
 
_b_hCommented:
I created an SQL script  mysql.sql in an IFS folder called bh.

In qshell, the command is
db2 -Svtf /bh/mysql.sql

So you should be able to put the script in the IFS and qualify the file name with a path.

Barry
0
 
stevebeechAuthor Commented:
Thanks Barry!
0
 
_b_hCommented:
You're welcome!
Check out this link for a manual on Qshell:
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/topic/rzahz/rzahz.pdf
There is a section on path names that qshell uses to search for files.
Barry
0

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now