Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Using dollor sign with variables

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
fixdoubts

New User


Joined: 21 Oct 2005
Posts: 54

PostPosted: Thu Mar 05, 2009 9:43 pm    Post subject: Using dollor sign with variables
Reply with quote

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

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10276
Location: italy

PostPosted: Thu Mar 05, 2009 9:49 pm    Post subject: Reply to: using dollor sign with variables.
Reply with quote

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

New User


Joined: 21 Oct 2005
Posts: 54

PostPosted: Fri Mar 06, 2009 2:22 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10276
Location: italy

PostPosted: Fri Mar 06, 2009 2:32 pm    Post subject: Reply to: Using dollor sign with variables
Reply with quote

did You care to look at the HLASM manuals at ( for example ) ...
http://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
View user's profile Send private message
fixdoubts

New User


Joined: 21 Oct 2005
Posts: 54

PostPosted: Fri Mar 06, 2009 2:34 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10276
Location: italy

PostPosted: Fri Mar 06, 2009 2:53 pm    Post subject: Reply to: Using dollor sign with variables
Reply with quote

don't You get a hint that the first format was wong and the second was right
I cannot do nothing but repeat myself icon_evil.gif
did You care to look at the HLASM manuals at ( for example ) ...
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/Shelves/ASMSH020
if You had, You would have found that the DS instruction is described
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ASMR1010/5.19?SHELF=ASMSH020&DT=20040728153937

RTFM
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 8 Wed Jan 25, 2017 8:24 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:23 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:21 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts Is it possible to pass variables of s... Csongor CLIST & REXX 2 Fri Jun 10, 2016 7:33 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us