IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Variables with prefix ++


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
monasu1998

Active User


Joined: 23 Dec 2005
Posts: 176
Location: India

PostPosted: Thu Nov 01, 2007 11:31 am
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Nov 01, 2007 12:07 pm
Reply with quote

I'm working with NATURAL for many years, and never saw such variables. Can you post the complete program?

O.
Back to top
View user's profile Send private message
monasu1998

Active User


Joined: 23 Dec 2005
Posts: 176
Location: India

PostPosted: Thu Nov 01, 2007 12:15 pm
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Nov 01, 2007 1:05 pm
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sun Nov 11, 2007 1:13 pm
Reply with quote

monasu1998 -

I'm still curious. Do you have any example of the ++ variables?

O.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Sun Nov 11, 2007 8:53 pm
Reply with quote

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
View user's profile Send private message
monasu1998

Active User


Joined: 23 Dec 2005
Posts: 176
Location: India

PostPosted: Tue Nov 13, 2007 11:59 am
Reply with quote

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
View user's profile Send private message
beruoist

New User


Joined: 14 Nov 2007
Posts: 70
Location: mumbai

PostPosted: Wed Nov 14, 2007 4:09 pm
Reply with quote

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
View user's profile Send private message
beruoist

New User


Joined: 14 Nov 2007
Posts: 70
Location: mumbai

PostPosted: Wed Nov 14, 2007 4:28 pm
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Nov 14, 2007 7:16 pm
Reply with quote

Where do you see "++" in your example?

O.
Back to top
View user's profile Send private message
beruoist

New User


Joined: 14 Nov 2007
Posts: 70
Location: mumbai

PostPosted: Wed Nov 14, 2007 7:47 pm
Reply with quote

oh...gosh..i missed that ++ part

Sorry haven't seen that stuff before icon_rolleyes.gif
Back to top
View user's profile Send private message
ramachsh

New User


Joined: 28 Dec 2005
Posts: 1
Location: Chennai

PostPosted: Mon Nov 19, 2007 7:01 pm
Reply with quote

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
View user's profile Send private message
monasu1998

Active User


Joined: 23 Dec 2005
Posts: 176
Location: India

PostPosted: Mon Nov 26, 2007 12:44 pm
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Nov 26, 2007 1:18 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts JCL with variables JCL & VSAM 1
No new posts JCL Variables JCL & VSAM 1
No new posts reset/clear ALL application profile v... TSO/ISPF 3
No new posts REXX - Adding variables CLIST & REXX 8
Search our Forums:

Back to Top