ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Dropping a schema without generating inquiry message CPA7025

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

  • Dropping a schema without generating inquiry message CPA7025

    I'm writing either a CLLE program or an SQL script to build a schema full of tables, programs, and service programs, and I'd like it to be fully automated.

    My issue is that in the beginning of the CL, when dropping the schema if it already exists, an inquiry message, CPA7025, is generated because the journal receiver QSQJRN0001 has not been fully saved. Alternatively, using an SQL script, conditional logic around the existence of the schema is needed, and I don't know of a way to do this within a script, and I don't want to make this an SQL function or procedure.

    There's probably a very simple and obvious way to get around this problem. Any suggestions?


    Here's the relevant CL code:

    dropSchema:
    chkobj MyLib *lib
    monmsg cpf9801 exec(goto crtSchema)

    runsql 'drop schema MyLib' commit(*none)
    monmsg MSGID(CPF0000)

    crtSchema: runsql 'create schema MyLib' commit(*none)

  • #2
    Re: Dropping a schema without generating inquiry message CPA7025

    Keith,

    Try DROP SCHEMA MyLib CASCADE and report back.

    Jim

    Comment


    • #3
      Re: Dropping a schema without generating inquiry message CPA7025

      Try looking at STRWCH and ENDWCH, this will allow you to respond to the message in the called exit program. Or set up a default reply list entry which automatically responds to any journal receiver delete without save messages.

      Chris...

      Comment

      Working...
      X