16.10.2015 Views

Getting Started with IBM Data Studio for DB2

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 5 – Creating SQL and XQuery scripts 173<br />

• <strong>DB2</strong> <strong>for</strong> z/OS (V10)<br />

• <strong>DB2</strong> <strong>for</strong> z/OS (V9)<br />

• <strong>DB2</strong> <strong>for</strong> i<br />

• In<strong>for</strong>mix<br />

Note:<br />

Version-specific syntax checking <strong>for</strong> <strong>DB2</strong> <strong>for</strong> Linux, UNIX, and Windows prior to V9.7<br />

uses the <strong>DB2</strong> V9.7 parser.<br />

For example, suppose you want to use the script that creates theTESTTABLE table <strong>with</strong> its<br />

index in a database on a <strong>DB2</strong> <strong>for</strong> z/OS V10 server. To validate the script <strong>for</strong> the target<br />

database, you can simply change the parser to <strong>DB2</strong> <strong>for</strong> z/OS (V10), which you can do<br />

while the script is still connected to the current database.<br />

In this case, theALLOW REVERSE SCANS clause in theCREATE INDEX statement is<br />

invalid <strong>with</strong> the <strong>DB2</strong> <strong>for</strong> z/OS V10 parser. The editor flags the validation error <strong>with</strong> red<br />

markers in the left and right margins and underlines the invalid syntax <strong>with</strong> a red squiggly<br />

line. As shown in Figure 5.22, you can review the message <strong>for</strong> a syntax error by hovering<br />

over the error marker in the margin.<br />

Figure 5.22 – Script statements validated <strong>with</strong> the <strong>DB2</strong> <strong>for</strong> z/OS (V10) parser

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!