{"id":268,"date":"2023-02-22T17:41:11","date_gmt":"2023-02-22T16:41:11","guid":{"rendered":"http:\/\/www.sepchat.com\/SC\/?p=268"},"modified":"2023-02-23T15:02:34","modified_gmt":"2023-02-23T14:02:34","slug":"ibm-i-comment-lancer-une-requete-sql-par-commande","status":"publish","type":"post","link":"http:\/\/www.sepchat.com\/SC\/index.php\/2023\/02\/22\/ibm-i-comment-lancer-une-requete-sql-par-commande\/","title":{"rendered":"IBM\u00a0i &#8211; Comment lancer une requ\u00eate SQL par commande"},"content":{"rendered":"\n<p>L&rsquo;API IBM \u00ab\u00a0<strong>QZDFMDB2<\/strong>\u00a0\u00bb&nbsp;permet d\u2019ex\u00e9cuter une requ\u00eates SQL dans un programme ou une ligne de commande.<\/p>\n\n\n\n<p>Exemple :<\/p>\n\n\n\n<p>Ecriture dans un fichier<\/p>\n\n\n\n<p>CALL QZDFMDB2 (&lsquo;INSERT INTO qgpl.qauoopt (OPTION, COMMAND) VALUES(\u00a0\u00bbob\u00a0\u00bb, \u00a0\u00bbWRKOBJPDM *ALL\u00a0\u00bb)&rsquo;)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>Puis pour consulter le r\u00e9sultat :<\/p>\n\n\n\n<p>CALL QZDFMDB2 (&lsquo;SELECT * FROM qgpl.qauoopt &lsquo;)<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized size-full has-custom-border\"><a href=\"sql2\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.sepchat.com\/SC\/wp-content\/uploads\/2023\/02\/fleche-r-edited.png\" alt=\"\" width=\"57\" height=\"57\"\/><\/a><\/figure>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex\">\n<div class=\"wp-block-button is-style-outline\"><a class=\"wp-block-button__link wp-element-button\" style=\"border-radius:100px\">Cet article vous a \u00e9t\u00e9 utile ? N\u2019h\u00e9sitez pas \u00e0 le partager.<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>L&rsquo;API IBM \u00ab\u00a0QZDFMDB2\u00a0\u00bb&nbsp;permet d\u2019ex\u00e9cuter une requ\u00eates SQL dans un programme ou une ligne de commande. Exemple : Ecriture dans un fichier CALL QZDFMDB2 (&lsquo;INSERT INTO qgpl.qauoopt (OPTION, COMMAND) VALUES(\u00a0\u00bbob\u00a0\u00bb, \u00a0\u00bbWRKOBJPDM *ALL\u00a0\u00bb)&rsquo;)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Puis pour consulter le r\u00e9sultat : CALL QZDFMDB2 (&lsquo;SELECT * FROM qgpl.qauoopt &lsquo;)<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[],"_links":{"self":[{"href":"http:\/\/www.sepchat.com\/SC\/index.php\/wp-json\/wp\/v2\/posts\/268"}],"collection":[{"href":"http:\/\/www.sepchat.com\/SC\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.sepchat.com\/SC\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.sepchat.com\/SC\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.sepchat.com\/SC\/index.php\/wp-json\/wp\/v2\/comments?post=268"}],"version-history":[{"count":3,"href":"http:\/\/www.sepchat.com\/SC\/index.php\/wp-json\/wp\/v2\/posts\/268\/revisions"}],"predecessor-version":[{"id":336,"href":"http:\/\/www.sepchat.com\/SC\/index.php\/wp-json\/wp\/v2\/posts\/268\/revisions\/336"}],"wp:attachment":[{"href":"http:\/\/www.sepchat.com\/SC\/index.php\/wp-json\/wp\/v2\/media?parent=268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.sepchat.com\/SC\/index.php\/wp-json\/wp\/v2\/categories?post=268"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.sepchat.com\/SC\/index.php\/wp-json\/wp\/v2\/tags?post=268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}