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