View previous topic :: View next topic
|
Author |
Message |
Andi1982
New User
Joined: 27 Mar 2008 Posts: 42 Location: Karlsruhe / Germany
|
|
|
|
Hey,
I already googled a lot for it but i did not find an answer to my question. We had this MVC in our program:
Code: |
MVC MEINKEY(4),=X'50505050'
MVC MEINKEY+4(4),SAVRABG
|
It produced this correct Output:
But for some co-worker it did not look nice enough. so he made this:
Code: |
MVC MEINKEY(4),=C'&&&&'
MVC MEINKEY+4(4),SAVRABG
|
and finally Output was like that:
So a lot of things did not work anymore because of that.
I changed it back now, but I would like to understand the meaning of this ampersand sign in strings.
Somebody here who can explain me what happened?
Best regards
Andi[/code] |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
the IBM assembler manuals will tell all You might want to know about the quirks of special chars |
|
Back to top |
|
|
Andi1982
New User
Joined: 27 Mar 2008 Posts: 42 Location: Karlsruhe / Germany
|
|
|
|
Hey,
thank you for your hint. I found out that it is used for variables in macros.
IBM Manual - Special characters
And if you want to have the ampersand then you have to use two. So this four ones resulted in just two. If I put '&&&&&&&&' then it results in 4.
Hope my co worker will be happy with that.
Thanks again for your hint! |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
In truth, both X'50505050' and C'&&&&&&&&' are pretty bad: X'50505050' leaves you guessing what the H is this 50?!; and &&&&&&&&, well, it's pretty obvious what the character is, but 8 & characters to produce 4 & characters is sort of weird. 4C'&&' might be a little better!
The single quote character is also strange, C'STEVE''S EXAMPLES ARE AWFUL' is sort of OK, but
Code: |
MSG DC 0CL133' ',C' I DON''T UNDERSTAND STRING '''
STRING DC CL8' ',CL(L'MSG-(*-MSG)'''' |
is a little hard to understand.
Similarly, text books always seem to use c*** like
Code: |
MVC TOD,=X'4021207A20207A20204B2020'
ED TOD,TIME
TIME DC X'23595999'
TOD DC C' HH:MM:SS.SS' |
That 24 character hex string is completely mysterious, but try typing it correctly! At least the TOD data area might take some of the mystery out of it. |
|
Back to top |
|
|
|