Hi,
I tried to create a dynamic include statement like,
INCLUDE READ-C '#FILE-NAME' '#FILE-KEY' '#FIELD-VALUE' .
But im getting NAT0274 Error 623 in line 20 of copycode.
READ-C :
0010 *
0020 READ &1& BY &2& EQ '&3&'
0030 *
0040 IF &2& NE &3&
0050 ESCAPE BOTTOM
0060 END-IF
0080 *
0090 END-READ
But if i use
INCLUDE READ-C 'EMPLOYEE' 'EMPLOYEE-NAME' '#FIELD-VALUE'
im not getting any error.
Cant we create a dynamic input field like #FILE-NAME while using a copycode ?
Regards
Arkantos
Include statement
- RGZbrog
- Posts: 101
- Joined: Mon Nov 23, 2009 1:34 pm
- Skillset: Natural, Adabas, Predict, Natural Security, Construct, EntireX, SPoD, NaturalONE
- Referer: SAG Developer Forum
- Location: California, USA
- Contact:
Re: Include statement
After the compiler has replaced the tags with the supplied values, the result must be valid Natural source code.
The second example works because EMPLOYEE is a valid view name. The first example fails because there is no such view as #FILE-NAME.
The syntax of a READ statement requires a view name, as in READ view. The view cannot be specified as the contents of a variable, what you refer to as a "dynamic input field." You would have to know all the view names and code something like
The second example works because EMPLOYEE is a valid view name. The first example fails because there is no such view as #FILE-NAME.
The syntax of a READ statement requires a view name, as in READ view. The view cannot be specified as the contents of a variable, what you refer to as a "dynamic input field." You would have to know all the view names and code something like
Code: Select all
DECIDE FOR FIRST CONDITION
WHEN something
INCLUDE READ-C 'EMPLOYEE' ...
WHEN something-else
INCLUDE READ-C 'VEHICLE' ...
Re: Include statement
Thanks RGZbrog .
-
- Similar Topics
- Replies
- Views
- Last post
-
- 2
- 1449
-
by willy jensen
View the latest post
Sun Nov 13, 2022 9:02 pm
-
- 8
- 4477
-
by steve-myers
View the latest post
Sat Oct 16, 2021 8:59 pm
-
-
Splice JCL into one record for DD statement parms
by phcribb » Thu Nov 05, 2020 9:31 pm » in CLIST & REXX - 3
- 1968
-
by phcribb
View the latest post
Fri Nov 06, 2020 8:06 pm
-