Skip to content

Unable to create an SQL global variable #423

@arco400

Description

@arco400

@edmundreinhardt

We use SQL global variables. I cannot find a way to create them with makei.
The resulting object type of an SQL global variable is an SRVPGM, I suppose that the complications lay in that fact.

For example the following source code, stored as valuse.sql.

SET path *libl ;

CREATE OR REPLACE VARIABLE VALUSE
	CHAR(1)
	DEFAULT  'N'  ;

LABEL ON VARIABLE VALUSE IS 'VALUSE indicator' ;

GRANT ALTER , READ , WRITE
ON VARIABLE VALUSE
TO PUBLIC;

Rules.mk:

VALUSE.SRVPGM: VALUSE.SQL

When I run makei I get:

Working directory: /home/simonsea/builds/mig/app
Commands:
                makei compile -f valuse.sql

targets: VALUSE.QMQRY
> /QOpenSys/pkgs/bin/make -k BUILDVARSMKPATH="/tmp/tmpigaa9l9o" -k BOB="/QOpenSys/pkgs/lib/bob" -f "/QOpenSys/pkgs/lib/bob/src/mk/Makefile" VALUSE.QMQRY
make: *** No rule to make target 'VALUSE.QMQRY'.
Objects:             0 failed 0 succeed 0 total
Build Completed!

I do not understand why it tries to treat it as an QMQRY type.
Is there a way/workaround to accomplish the creation of an SQL Global Variable?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions