<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>blog.mycado.fr &#187; prompt</title>
	<atom:link href="http://blog.mycado.fr/tag/prompt/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mycado.fr</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 28 Oct 2009 12:21:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Customize your DB2 CLP prompt</title>
		<link>http://blog.mycado.fr/2009/09/customize-your-db2-clp-prompt/</link>
		<comments>http://blog.mycado.fr/2009/09/customize-your-db2-clp-prompt/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 04:59:14 +0000</pubDate>
		<dc:creator>Stéphane Journot</dc:creator>
				<category><![CDATA[IBM DB2]]></category>
		<category><![CDATA[CLP]]></category>
		<category><![CDATA[DB2]]></category>
		<category><![CDATA[db2set]]></category>
		<category><![CDATA[prompt]]></category>

		<guid isPermaLink="false">http://blog.mycado.fr/?p=194</guid>
		<description><![CDATA[You have a nice DB2 CLP prompt, looks like &#8220;db2&#62;&#8221;, but you want more, you want a efficient prompt. It is possible with DB2 to add or modify your CLP ! DB2 have a registry variable named DB2_CLPPROMPT which allows us to define the prompt to be used in the CLP interactive mode.
To define this [...]]]></description>
			<content:encoded><![CDATA[<p>You have a nice DB2 CLP prompt, looks like &#8220;db2&gt;&#8221;, but you want more, you want a efficient prompt. It is possible with DB2 to add or modify your CLP ! DB2 have a registry variable named DB2_CLPPROMPT which allows us to define the prompt to be used in the CLP interactive mode.</p>
<p>To define this variable, let&#8217;s use the DB2set command:</p>
<pre>Db2set DB2_CLPPROMPT="db2isgreat&gt; "</pre>
<p>Our new DB2 Prompt will be &#8220;<strong>db2isgreat&gt;</strong> &#8220;. It&#8217;s much more better, but we can do more. DB2_CLPPROMPT registry variable can contain the tokens %n, %ia, %d, %da and %i:</p>
<ul>
<li><strong>%n</strong> &#8211; New line</li>
<li><strong>%ia</strong> &#8211; Authorization ID of the current instance attachment</li>
<li><strong>%d</strong> &#8211; Local alias of the currently connected database</li>
<li><strong>%da</strong> &#8211; Authorization ID of the current database connection</li>
<li><strong>%i</strong> &#8211; Local alias of the currently attached instance</li>
</ul>
<p>Now, let&#8217;s try with these tokens:</p>
<pre>Db2set DB2_CLPPROMPT="%ia@%i, %da@%d&gt; "</pre>
<p>With an instance attachment to instance &#8220;DB2&#8243; with authorization ID &#8220;mycado&#8221;. Database &#8220;sample&#8221; with authorization ID &#8220;mycadoax&#8221;, will return something like:</p>
<pre>MYCADO@DB2, MYCADOAX@SAMPLE &gt;</pre>
<p>You can now everytime where you are, and one which instance/database you&#8217;re working on.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mycado.fr/2009/09/customize-your-db2-clp-prompt/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
