View previous topic :: View next topic
|
Author |
Message |
monasu1998
Active User
Joined: 23 Dec 2005 Posts: 176 Location: India
|
|
|
|
Hi ,
I have the following declarations for variables.
#VAR1 - Local
##VAR2 - Global
+VAR3 - AIV
++VAR4 - What kind of this variable is? I came across this type of declaration for the first time. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
I'm working with NATURAL for many years, and never saw such variables. Can you post the complete program?
O. |
|
Back to top |
|
|
monasu1998
Active User
Joined: 23 Dec 2005 Posts: 176 Location: India
|
|
|
|
Hi Ofer,
I do not have access to mainframes.
My team working away has encountered this variable.
I will ask them to send me the screen dump for a check.
Thanks |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
I also asked people here with lots of experience, an no one saw something like this.
In addition, I was searching the SAG-L Archive and the documentation - but no such thing.
By the way, I tried writing a program containin '++' at the start of a variable: such program won't STOW.
O. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
monasu1998 -
I'm still curious. Do you have any example of the ++ variables?
O. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
ofer71 wrote: |
monasu1998 -
I'm still curious. Do you have any example of the ++ variables?
O. |
Try looking in C, C+, and C# languages you might find them but not in Natural. |
|
Back to top |
|
|
monasu1998
Active User
Joined: 23 Dec 2005 Posts: 176 Location: India
|
|
|
|
Ofer,
I am still waiting to see that module.
One of my team member told me about it. But he is not able to trace the module.
Even I did not get any thing using SCAN command.
I really apologise for the inconvinience.
ofer71 wrote: |
monasu1998 -
I'm still curious. Do you have any example of the ++ variables?
O. |
|
|
Back to top |
|
|
beruoist
New User
Joined: 14 Nov 2007 Posts: 70 Location: mumbai
|
|
|
|
These are the Parameter vars,as far as i have seen check in ur PGM those vars must be passed to some sub PGM
for an example i have collected details from one of sub PGM
"2680 2 SI-NO-OF-SHARES
7580 MOVE DISC-INQUIRIES-2.SI-NO-OF-SHARES TO +F01-NO-OF-SHARES " |
|
Back to top |
|
|
beruoist
New User
Joined: 14 Nov 2007 Posts: 70 Location: mumbai
|
|
|
|
I found this one strange as all + vars are AIV's,but this is the truth i faced.
Please correct me if i am wrong |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Where do you see "++" in your example?
O. |
|
Back to top |
|
|
beruoist
New User
Joined: 14 Nov 2007 Posts: 70 Location: mumbai
|
|
|
|
oh...gosh..i missed that ++ part
Sorry haven't seen that stuff before |
|
Back to top |
|
|
ramachsh
New User
Joined: 28 Dec 2005 Posts: 1 Location: Chennai
|
|
|
|
Hi,
Variables starting with '+':
These variables are called GDA variables and these are simmillar to global variables in java or C++.ie.You can use this variable thru out the program execution(in all sub programs called from main pgm...)Normally ppl use these for storing date,user names,job names etc..
Variables starting with '++':
And as far as I know there is no such variable starting with '++'.If you provide us some examples,that would help us to look into it.
Cheers,
Shiva |
|
Back to top |
|
|
monasu1998
Active User
Joined: 23 Dec 2005 Posts: 176 Location: India
|
|
|
|
Hi Siva,
I have not seen such ++ variables anywhere. One of my team member asked me about this, I posted this in the forum, as I was not sure of this.
There is no rule that + prefixed variables are always global variables. That is completely installation defined and depends on the shop you are working from.
I my last project global varibles were defined as ## as prefix and in current project ht is ££ as prefix.
Please correct me if I am wrong.
Thanks |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
monasu1998 -
You are not wrong. The '+' sign for global variables is a convention only (although widely used), but not enforced by syntax rules.
O. |
|
Back to top |
|
|
|