MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » October 2004

RUNSQLSTM



fixed

I'm a greenhorn,

Trying to use SQL statements in CL program to update a temp file for a
report.
Using CSSTKN3 to run SQL statements in CSSTKN4...

CSSTKN3 - Source

1.00              PGM
2.00              RUNSQLSTM  SRCFILE(R36MODS/QCLSRC) SRCMBR(CSSTKN4) +
3.00              COMMIT(*NONE)
4.00              ENDPGM


CSSTKN4 - Source

01.00              CREATE TABLE QTEMP/TBLSTKN (ITEM CHAR (20 ) NOT NULL WITH
DEFAULT,
02.00              QTY DEC (10 , 4) NOT NULL WITH DEFAULT)
03.00              INSERT INTO QTEMP/TBLSTKN SELECT IJITEM , SUM(IJQTY) FROM
CSSTKN
04.00              GROUP BY IJITEM

What looks wrong? - Table gets created but having problem with insert I
think.

DUMP attached...




Tim Ellifritz
Creative Stage Lighting Co., Inc.
149 Rt. 28N
North Creek, NY 12853
T 518-251-3302 X 218
F 518-251-2908

            Message                               Message                 From  
                       To                    
Time        ID                  Sev       Type    Text                    
Program          Inst        Program          Inst 
141225      SQL9010             30        ESC     RUNSQLSTM command faile 
QSQSCHEM         078F        CSSTKN3          000C 
                                                  d.                            
                                             
141225      CPF9999             40        ESC     Function check. SQL9010 
QMHUNMSG         0000        CSSTKN3          000C 
                                                   unmonitored by CSSTKN3       
                                             
                                                   at statement 200, inst       
                                             
                                                  ruction X'000C'.              
                                             
                                                            Variables           
                                             





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact