************************************************************************* ** ** Source File Name = setact.cbl ** ** Licensed Materials - Property of IBM ** ** (C) COPYRIGHT International Business Machines Corp. 1995, 2000 ** All Rights Reserved. ** ** US Government Users Restricted Rights - Use, duplication or ** disclosure restricted by GSA ADP Schedule Contract with IBM Corp. ** ** PURPOSE: to show the invokation of the SET ACCOUNTING STRING API ** ** API USED : ** SET ACCOUNTING STRING sqlgsact ** ** For more information about these samples see the README file. ** ** For more information on Programming in COBOL, see the: ** - "Programming in COBOL" section of the Application Development Guide. ** ** For more information on Building COBOL Applications, see the: ** - "Building COBOL Applications" section of the Application Building Guide. ** ** For more information on the SQL language see the SQL Reference. ** ********************************************************************** Identification Division. Program-ID. "setact". Data Division. Working-Storage Section. copy "sqlenv.cbl". copy "sql.cbl". copy "sqlca.cbl". * Local variables 77 rc pic s9(9) comp-5. 77 errloc pic x(80). * Variables for the SET ACCOUNTING STRING API 77 account-str-len pic s9(4) comp-5 value 0. 77 account-str pic x(200). Procedure Division. Main Section. display "Sample COBOL program: setact.cbl". move " " to account-str. ************************* * SET ACCOUNTING STRING * ************************* call "sqlgsact" using by value account-str-len by reference account-str by reference sqlca returning rc. move "SET ACCOUNTING STRING" to errloc. call "checkerr" using SQLCA errloc. display "The accounting string has been set". End-Main. stop run.