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

StackOverflow https://stackoverflow.com/questions/5387583

  •  28-10-2019
  •  | 
  •  

Question

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?

Was it helpful?

Solution 2

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'

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top