简体   繁体   中英

websphere, SQL1103: Position 24 Column definitions for table STVRECONWK in QTEMP not found

I have a table that is created and then deleted at the end of an SQLRPGLE program

     //Delete the temporary table
     shell('DLTF FILE(QTEMP/STVRECONWK)':IGNORE_ERROR);

     // create temporary table
     exec sql
       create table qtemp/stvreconwk (
         sysid integer,
         barcode varchar(100),
         description varchar(100),
         matchflag char(1)
       )
     ;

Whenever I try to compile from WebSphere I get

SQL1103: Position 24 Column definitions for table STVRECONWK in QTEMP not found.

The problem is that the table does not exist, if I create the table from a terminal session and then compile (from the terminal also) it works becuase the compiler is able to validate the table as they are running in the same job.

How can I do this in WebSphere?

A file that is created in QTEMP yet is also accessed as an "externally-described" file by the compiler should be created as a duplicate of a 'model' file. Any program that needs to reference the external file description should be compiled to reference the 'model' file that should always exist. The 'model' provides all necessary attributes for the compiler. An override provides access to the duplicate for the program at run-time. The 'model' is just a file description that resides in a library in the library list at compile-time.

With recent versions of the compiler, an override isn't necessary. For RPG, the F-spec can include the EXTDESC() or the EXTFILE() keyword to note either the 'model' file or the run-time file.

In most cases, the 'model' would be duplicated to a QTEMP file using a different name to avoid conflicts.

By Default the WebSphere will run each command in a new job. You can change this in window->preferences->iseries->command execution and uncheck 'compile in batch'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM