I know an edit mask is made of
− A fill byte
− Digit select characters (x’20’)
− Significance start characters (x’21’)
− Field separator characters (x’22’)
− Message bytes (anything else)
The first byte is the "fill byte".
![Arrow :arrow:](https://www.ibmmainframeforum.com/images/smilies/icon_arrow.gif)
CODE SNIPPET:ED MASK,NUM1
MVC OUTREC,MASK
PUT OUTFILE,OUTAREA
NUM1 DC P'0012345'
MASK DC X'5C2020202020204B20'
OUTAREA DS 0CL80
OUTREC DS CL9
SET DS CL71' '
BUT THIS IS GIVING THE O/P AS "***1234.5" BUT I WANTED WAS
"**1234.5" IT IS GIVING ONE * EXTRA.IS THERE ANY PROBLEM IN MY CODING COULD U CHECK THIS OUT
I believe your code is working.
Now you need to add another MVC to move the length you want from the result of the EDit to the "final output" area.
One of the "features" of the EDit is that it has to have things "its own way" which means all of the digits need to be accounted for. Once the instruction completes, you have control of the result.
Let me know if that doesn't get the result you want.
Just one additional hint. Your EditMask must have as many signs as as there are numerics in your pack-field, plus each special sign for editing the output.
Example:
Pack-Field DC PL04'4321'
This is hex 00 04 32 1C, which means 7 numeric digits
So mask could be normaly 20202020202020 without any special-sign
And now with Comma and point 20204B2020216B2020
This will result in 43,21 The mask-sign 20 doesn't print a zero but the mask-sign 21 prints it.
So now: pack-field = 7 digits = mask = 7 digits + 4B + 6B = 9 EditSigns
You could a an 5C in front for getting the floating asteriks until a non zero numerig digit. You could also add an hex 60 for getting a negative-sign printed, when the the value is less then zero.
I made a typographical error, which changes how one must look at the information. How does the edit instruction respond to this new parameter? Should I just RTFM?The first problem is you have an even number of digit select characters (20 and 21) in your mask.Until you learn ED/EDMK really well, you should always specify an odd number of digit select characters. The second problem is you ran out of digit select characters before you ran into a non-zero digit in the data, so ED replaced all the digit selects and the 60 character at the end of your mask with the fill character.
How does the edit instruction respond to this new parameter? Should I just RTFM?
What new parameter? I dob't think ED has ever chamged. There was a minor change to EDMK for AMODE 31 operation.RISCCISCInstSet wrote:... How does the edit instruction respond to this new parameter? Should I just RTFM?