Hi,
i’m going to extend the situation.
There is nothing about a CALLNAT in my problem, that was only an example of the sentence i’m finding.
How you know well, Natural can run a CALLNAT recovering the subprogram from the content of a variable.
if i run “CALLNAT W-PROGRAM” not ‘W-PROGRAM’ be executed but it’s run the subrprogram loaded like text in this variable W-PROGRAM. That is i am finding to resolve my situación, to load data into a variable whos name is into another variable.
MOVE ‘field3’ TO W-VARIABLE
*
MOVE ‘XXXX’ TO W-VARIABLE
I want to load ‘XXXX’ into variable FIELD3, not into W-VARIABLE.
Something like MOVE ‘XXXX’ to VAR(W-VARIABLE)'.
I dont know exist something in Natural to do this. This is i’m asking you, if there are some possibility to get this, with some hack, userexit from SYSEXT, some utility or another thing.
For example, i have a parameter, with 100 diferent fields (no array) like this:
1 W-PARAMETER
2 field1 (A20)
2 field2 (a14)
2 filed3 (N8)
…
2 filed100 (a1)
1 TAB-FILE view of TAB-FILE
2 USER
2 FUNCIONALITY
2 PROFILE
2 etc. etc. etc
2 NAME-OF-FIELD-TO-RESET (A40/50) <------------
I have to reset the content of some of that field in this parameter, but what fields i have to reset i dont know in the code, because i will identify what concret field to reset from a ADABAS file (TAB-FILE in this example), recovered according a differnte situación, like funcionality running, *USER, etc, etc. The name of the fields are stored in the file like text, for example into a MU field.
With a FIND i recover the name of fields to reset, for example, ‘field3, field24, field47 and field78’.
Now, how i reset or move some data to field3, field24, etc, etc?
Any of the fields of the parameter are likely to be recover from the file.
Only solution i know it’s something like
FOR W-I to NUM-FIELDS-TO-RESET (or similar sentence)
DECIDE FOR FIRST VALUE NAME-OF-FIELD-TO-RESET(W-I)
value ‘FIELD1’
RESET field1
value ‘FIELD2’
RESET field2
... All the 100 fields would have to be declarated here
value 'FIELD100'
RESET field100
END-DECIDE
END-FOR
Nothing to talk about if it’s more or less eficient use FOR FIRST CONDITION or another. That it isn’t the problema. I know the answer.
I’m finding some more ‘professional’ method to do this than a DECIDE.
I tell you, there isn’t possibilities to recover the fields to reset from another methology. I have to recover from that ADABAS parametric file.
Thanks again.