View previous topic :: View next topic
|
Author |
Message |
fixdoubts
New User
Joined: 21 Oct 2005 Posts: 54
|
|
|
|
Hi,
I had a code piece in one of my program like
var3 equ *
$var1 DS ($var2-$var3)XL1
this gave me a compile problem.
Later i changed my code as
$var3 equ (*-var4)
$var1 DS ($var2-$var3)XL1
Here var4 is starting point of my working storage, with this change my code compiled correctly.
I wanted to know what is the exact significance of the dollar sign in these declarations and why exactly my first code didn't compile correctly. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
f the program is Yours You should be able to tell why You decided to have variable names starting with a $
Quote: |
var3 equ *
$var1 DS ($var2-$var3)XL1
this gave me a compile problem.
Later i changed my code as
$var3 equ (*-var4)
$var1 DS ($var2-$var3)XL1
Here var4 is starting point of my working storage, with this change my code compiled correctly. |
Your analisys is wrong, the change that made the snippet compile correctly is that in the second case You defined $var3.
the equates equ *, equ (*-var4) are irrelevant in this case, it is the label that counts |
|
Back to top |
|
|
fixdoubts
New User
Joined: 21 Oct 2005 Posts: 54
|
|
|
|
I checked with one of the old codes which had a similar code which i used.
So before i go ahead and use this change i wanted to know more about the usage of litral $. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
did You care to look at the HLASM manuals at ( for example ) ...
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/Shelves/ASMSH020
if You had, You would have found that.....
Quote: |
....symbol must not consist of more than 63 alphanumeric characters. The first character must be an alphabetic character. An alphabetic character is a letter from A through Z, or from a through z, or $, _, #, or @. The other characters in the symbol may be alphabetic characters, digits, or a combination of the two. |
|
|
Back to top |
|
|
fixdoubts
New User
Joined: 21 Oct 2005 Posts: 54
|
|
|
|
also when i tried with the code
$ENDWORK EQU *
*NDALLOC EQU ACCTWORK+500
$WORKREM DS ($LCLMDSPWK-$ENDWORK)XL1
it gave an error
ASMA080E STATEMENT IS UNRESOLVABLE, but it went fine with code
$ENDWORK EQU (*-ACCTWORK)
*NDALLOC EQU ACCTWORK+500 AMOUNT
$WORKREM DS ($LCLMDSPWK-$ENDWORK)XL1 |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
|