OPS/MVS

 View Only
  • 1.  Where does OPCRTBDF output the Create Statement to?

    Posted Sep 25, 2017 03:13 PM

    I looked in the EDQ and the LOG but didn't see anything. I don't see any global variables being defined either. I see return statements and an exit but nothing that would indicate where the create statement is going.



  • 2.  Re: Where does OPCRTBDF output the Create Statement to?
    Best Answer

    Broadcom Employee
    Posted Sep 25, 2017 04:06 PM

    Hi Travis,

     

    You should call this subroutine from another REXX program as a function. The SQL CREATE statement will be the result of this call. For example:

     

    SQLST = OPCRTBDF('TABLE(STCTBL) NEWTABLE(STCTBL2)')
    PARSE VAR SQLST RETC SQLST
    SAY 'RETURN CODE ' RETC
    SAY 'SQL STATEMENT' SQLST

     

    The first word of the resulting variable SQLST will contain the return code of the OPCRTBDF execution. The rest of the words will contain the SQL CREATE statement itself if the execution was successful.

     

    Regards,

    Mario

    Carlos Mario Filho
    Principal Support Engineer



  • 3.  Re: Where does OPCRTBDF output the Create Statement to?

    Posted Sep 25, 2017 04:20 PM

    Thanks. That is exactly what I needed.