MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ASM question

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
waitling
Beginner


Joined: 12 Dec 2006
Posts: 15
Topics: 3

PostPosted: Mon Jun 18, 2007 9:49 am    Post subject: ASM question Reply with quote

Hi all

I encountered a strange(strange to me) question when coding a ASM table, like
Code:

TABLE      EQU   *
               ..............
               DC    C'7C @'
               DC    C'7B #'
               DC    C'5B $'
               DC    C'6C %'
               DC    C'50 &'
TABLEND  EQU   *     
               END   

following is the compiled list of the section:
Code:

                      0009C          61 TABLE    EQU   *           
                                         ...............................................
000150 F7C3407C                     107          DC    C'7C @'
000154 F7C2407B                     108          DC    C'7B #'
000158 F5C2405B                     109          DC    C'5B $'
00015C F6C3406C                     110          DC    C'6C %'
                                    111          DC    C'50 &'
HEXTOCH  HEX CHARACTER VALUE TO CHARACTER                     
  Active Usings: HEXTOCH,R12                                 
  Loc  Object Code    Addr1 Addr2  Stmt   Source Statement   
                                       +         DC         &'
** ASMA040S Missing operand                                   
** ASMA024E Invalid variable symbol - '                       
** ASMA435I Record 111 in ZOSDV1.ZOS5501.SOURCE(HEXTOCH) on vo
                      00160         112 TABLEND  EQU   *     
                                    113          END         

well , one more line appears in the compiled list, anyone knows why?
and when i got rid of the last line(DC C'50 &') , it returns normal.
Back to top
View user's profile Send private message
CICS Guy
Intermediate


Joined: 30 Apr 2007
Posts: 292
Topics: 3

PostPosted: Mon Jun 18, 2007 10:03 am    Post subject: Reply with quote

The ampersand is a special character to the assembler.
Back to top
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Mon Jun 18, 2007 2:39 pm    Post subject: Reply with quote

Solution is to double the special characters that are part of the data(apsotrophes, ampersands) and it assembles as one char:
Code:
     DC    C'50 &&'
or
   DC  C'This is Bob''s'

_________________
Regards,
Bill Dennis

Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
Back to top
View user's profile Send private message
waitling
Beginner


Joined: 12 Dec 2006
Posts: 15
Topics: 3

PostPosted: Tue Jun 19, 2007 9:49 am    Post subject: Reply with quote

CICS Guy & Bill Dennis

Thanks!!!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group