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 

MVC Edit Masks?

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


Joined: 10 Apr 2003
Posts: 3
Topics: 2
Location: St. Paul Minnesota

PostPosted: Mon Jul 19, 2004 3:15 pm    Post subject: MVC Edit Masks? Reply with quote

I have some code I need help finding info about...

Code:

...
MVC  ZAL1EX,=X'F0202120'
ED    ZAL1EX(4),$PRIMARY+4
...
$PRIMARY DS   PL6
ZAL1EX     DS   CL4
...


Problem with this code is when $Primary > 1000, I lose the the value. Actually 1000 seems to come out just 1, other numbers seem to have their leading digit lopped off, 1434 becomes just 434.

Can someone tell me what the masking in the first statement is called? I'm looking through my assembler book but have yet to find it. Pointers to references would also be appriciated.

Thanks!
Back to top
View user's profile Send private message Send e-mail
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Mon Jul 19, 2004 3:48 pm    Post subject: Reply with quote

OK, it can get complicated, but it gets easier with practice.

$PRIMARY+4 in your example, only leaves 2 bytes of $PRIMARY to deal with (that's the last 2 bytes, that can be referred to as $PRIMARY+4 and $PRIMARY+5).

That's just fine for the edit pattern you've specified, because it allows for just 3 digits. If you want to allow for values of 1000+ you need to extend the edit pattern and use more bytes of $PRIMARY.

If you changed your code to
Code:

MVC  ZAL1EX,=X'F02020202120'
ED    ZAL1EX(6),$PRIMARY+3
...
$PRIMARY DS   PL6
ZAL1EX     DS   CL6

you could go up to 99999.

These links may help:

http://publibfp.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/dz9zr000/8.3.4?SHELF=&DT=20010102160855&CASE=

http://publibfp.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/dz9zr000/A.4.4?SHELF=&DT=20010102160855&CASE=

Hope this helps.
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
ajdeaver
Beginner


Joined: 10 Apr 2003
Posts: 3
Topics: 2
Location: St. Paul Minnesota

PostPosted: Tue Jul 20, 2004 3:19 pm    Post subject: Worked well. Reply with quote

Solution worked well and I figured out a bit more on how it works from the reading.

THanks.
Back to top
View user's profile Send private message Send e-mail
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