0

I'm trying to use SCOPED-DEFINE or GLOBAL-DEFINE preprocessor variable as named input parameter to my .i file.

myprocedure.p:

&GLOBAL-DEFINE MYDATATYPE INTEGER

{myinclude.i &DATATYPE={&MYDATATYPE} }

myinclude.i:

DEF VAR data AS &DATATYPE NO-UNDO.

Does Progress support this type of functionality? I'd also like to be able to "forward" include parameters to another include file inside that include.

2 Answers 2

3

Sure.

myprocedure.p:

&GLOBAL-DEFINE MYDATATYPE INTEGER

{Training/PP/myinclude.i &DATATYPE={&MYDATATYPE}}

or

&GLOBAL-DEFINE MYDATATYPE INTEGER

{Training/PP/myinclude.i &DATATYPE="{&MYDATATYPE}"}

and myinclude.i:

DEF VAR data AS {&DATATYPE} NO-UNDO.

You were missing the curly braces in the include file.

Sign up to request clarification or add additional context in comments.

Comments

1

Take a look at the documentation for the syntax of how to reference and pass arguments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.