ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

runsqlstm create table suppress print

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • runsqlstm create table suppress print

    Hi All:

    I have an sql create table scripted and executed by runsqlstm.
    Is there any way to suppress or hold the printout?
    Code:
    RUNSQLSTM SRCFILE(MYLIB/QSOURCE) SRCMBR(CHASC) COMMIT(*NONE)
    PHP Code:
    CREATE TABLE QTEMP/CHASQ AS ( Select blah blah blah where blahwith data 
    PHP Code:
    Source file...............MYLIB/QSOURCE 
    Member
    ....................CHASC           
    Commit
    ....................*NONE           
    Naming
    ....................*SYS            
    Generation level
    ..........10              
    Date format
    ...............*JOB            
    Date separator
    ............*JOB            
    Time format
    ...............*HMS            
    Time separator 
    ...........*JOB            
    Right margin
    ..............80              
    Default collection........*NONE           
    IBM SQL flagging
    ..........*NOFLAG         
    ANS flagging
    ..............*NONE           
    Decimal point
    .............*JOB            
    Sort sequence
    .............*JOB            

    blah blah blah

    MSG ID  SEV  RECORD  TEXT                                         
    SQL7950   0       1  Position 1 Table CHASQ created in QTEMP
    .     
                        
    Message Summary                               
      Total     Info   Warning      Error   Severe  Terminal          
          1        1         0          0        0         0          
    00 level severity errors found in source 
    Thanks in advance
    GLS
    The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

  • #2
    Re: runsqlstm create table suppress print

    on RUNSQLSTM look at the OPTION keyword. I usually use *ERRLIST but you can also use *NOLIST.

    Comment


    • #3
      Re: runsqlstm create table suppress print

      Thanks Scott
      .....I don't see "option" on the runsqlstm
      .....I'm at V6R1

      GLS
      The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

      Comment


      • #4
        Re: runsqlstm create table suppress print

        I am at V7R1 so maybe it didn't exist at V6R1. When I prompt (F4) RUNSQLSTM and press F10 it is in the middle of the second page called 'Source listing options', if you don't have it then must have been added later.

        Comment


        • #5
          Re: runsqlstm create table suppress print

          Not sure how other people feel about this... but, personally, I do not like to use RUNSQLSTM in an automated program. I think RUNSQLSTM is fine for procedures that are run by IT personnel interactively... and that's where I use it. When I want SQL statements to be run automatically or by an end-user, I will put them into an embedded SQL program where I can do proper error handling, et al, instead of generating a spooled file. Or maybe use the new-ish RUNSQL CL command...

          Again, not sure if other people feel the same, just my opinion.

          Comment


          • #6
            Re: runsqlstm create table suppress print

            Thanks Scott K :

            I used the runsql in my clle and it worked great

            Thanks again
            GLS
            The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

            Comment


            • #7
              Re: runsqlstm create table suppress print

              The parameter exists at i 6.1. You can find the parameter by typing RUNSQLSTM OPTION(*NOLIST) on a command line and pressing F4. You don't actually need to use a valid parameter value; an invalid value would be even more visible.
              Tom

              There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

              Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

              Comment


              • #8
                Re: runsqlstm create table suppress print

                Thanks Tom:

                When i run that i get this error:

                PHP Code:
                Message ID . . . . . . :   CPD0043       Severity . . . . . . . :   30      
                Message type 
                . . . . . :   Diagnostic                                       
                Date sent  
                . . . . . . :   01/16/15      Time sent  . . . . . . :   14:39:56
                                                                                            
                Message 
                . . . . :   Keyword OPTION not valid for this command.              
                Cause . . . . . :   A keyword was specified on a command that has no        
                  corresponding parameter
                .                                                  
                Recovery  . . . :   Correct or omit the keyword, and then try the command   
                  again

                I probably need PTFs

                GLS
                The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

                Comment


                • #9
                  Re: runsqlstm create table suppress print

                  Originally posted by GLS400 View Post
                  When i run that i get this error:

                  Message ID . . . . . . : CPD0043
                  Interesting. I simply checked my i 6.1 system and found the parm. But, a few things are indeed odd:

                  1. Are you sure you have i 6.1?
                  2. The i 6.1 Info Center does not show OPTION() for RUNSQLSTM.

                  What cume and DB2 group PTF levels is your system running under? My system is a year behind. (I'm scheduling an i 7.1 upgrade, so I haven't decided how many PTFs to load.)

                  Updated:

                  See PTF SI47792 - OSP-DB Add a listing option to the RUNSQLSTM command

                  That should explain it.
                  Last edited by tomliotta; January 18, 2015, 03:32 PM. Reason: Added PTF
                  Tom

                  There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

                  Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

                  Comment

                  Working...
                  X