edmk instruction

110 views
Skip to first unread message

Greg Gray

unread,
Nov 1, 2017, 3:07:21 PM11/1/17
to ASSEMBL...@listserv.uga.edu
I have a field PL7 that contains a number (dollar amount) and I have to output that amount into a CL15 output field. The customer would like for the remaining characters other than the digits for the amount to be zeros, i.e., 000000000012391. I am trying to code a EDMK pattern with no success, has anyone ever completed such a task?

Sokolsky, Hayim Z.

unread,
Nov 1, 2017, 3:29:07 PM11/1/17
to ASSEMBL...@listserv.uga.edu
Just a try of the top of my head ...

MVC OUTPUT(15),=X'F0202020202020202020202020202120'
EDMK OUTPUT(15),NUMBER


The first character in the output field is the "fill" character. In this case it's a C'0'. So even though all the x'20' characters prior to the x'21' get replaced by fill, it's zero anyhow. The only difference between ED and EDMK is pointing R1 to the first significant digit.


Hayim Sokolsky
Director, Senior Mainframe Security Architect
Security Architecture and Technology
Technology Risk Management
DTCC Tampa
Direct: +1 813 470-2177 | hsok...@dtcc.com



Visit us at www.dtcc.com or follow us on Twitter @The_DTCC  and on LinkedIn.
To learn about career opportunities at DTCC, please visit dtcc.com/careers.

Classification:  DTCC Public (WHITE)

The views I have expressed in this email are my own personal views, and are not endorsed or supported by, and do not necessarily express or reflect, the views, positions or strategies of my employer.
DTCC DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please notify us immediately and delete the email and any attachments from your system. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

Steve Smith

unread,
Nov 1, 2017, 3:30:27 PM11/1/17
to ASSEMBL...@listserv.uga.edu
Yes, probably thousands have. "No success" is rather vague.

MVC CL15,x'f0f0202020202020202020202020202020'
ED CL15,PL7

UNPK CL15,PL7 would also accomplish this task, as you're not really
using any of ED's power.


On Wed, Nov 1, 2017 at 3:07 PM, Greg Gray <gregor...@irs.gov> wrote:
> I have a field PL7 that contains a number (dollar amount) and I have to output that amount into a CL15 output field. The customer would like for the remaining characters other than the digits for the amount to be zeros, i.e., 000000000012391. I am trying to code a EDMK pattern with no success, has anyone ever completed such a task?



--
sas

Pieter Wiid

unread,
Nov 1, 2017, 4:06:26 PM11/1/17
to ASSEMBL...@listserv.uga.edu
If you have a x'21' in the edit pattern, you may as well use ED instead of EDMK.
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Steve Smith

unread,
Nov 1, 2017, 4:24:47 PM11/1/17
to ASSEMBL...@listserv.uga.edu
Maybe for you, but not in general.

David Woolbright

unread,
Nov 1, 2017, 4:57:03 PM11/1/17
to ASSEMBL...@listserv.uga.edu
Check out this link for general info about EDMK with examples:
http://csc.columbusstate.edu/woolbright/Instructions/EDMK.pdf
--
Dr.David E. Woolbright
Professor of Computer Science
TSYS School of Computer Science
Columbus State University
4225 University Avenue
Columbus, Georgia 31907-5645
(706) 580-9863
woolbrig...@columbusstate.edu

Steve Thompson

unread,
Nov 1, 2017, 5:44:09 PM11/1/17
to ASSEMBL...@listserv.uga.edu
Does the customer really want something like 00000$10245670 ?

Because with EDMK and the mask you have specified that is pretty
much how this is going to work (as least the first three looks I
took at this trying to figure out why the edit mask was written
the way it is).

Regards,
Steve Thompson

Charles Mills

unread,
Nov 1, 2017, 6:00:31 PM11/1/17
to ASSEMBL...@listserv.uga.edu
EDMK is used when you want a "floating" (just before the first significant digit) dollar sign or similar. You back up R1 by 1 and that is where your dollar sign goes.

I think there are ED and EDMK examples in the PoOp, no? Read them carefully. Read them very carefully. ED and EDMK are powerful but there is a price in complexity for that power.

Pay attention to that fill character and "significance."

Charles


-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBL...@LISTSERV.UGA.EDU] On Behalf Of Steve Thompson
Sent: Wednesday, November 1, 2017 2:44 PM
To: ASSEMBL...@LISTSERV.UGA.EDU
Subject: Re: edmk instruction

Steve Thompson

unread,
Nov 1, 2017, 7:02:30 PM11/1/17
to ASSEMBL...@listserv.uga.edu
On 11/01/2017 06:00 PM, Charles Mills wrote:
Charles, forgive me but not only do I agree with you, I think
your two points are worth drawing a lot of attention to.

<snippage>
>
> Pay attention to that fill character and "significance."
> ^^^^^^^^^^^^^^ ^^^^^^^^^^^^
<Snippage>

retired mainframer

unread,
Nov 1, 2017, 8:33:20 PM11/1/17
to ASSEMBL...@listserv.uga.edu
Where did the $ come from?

> -----Original Message-----
> From: IBM Mainframe Assembler List [mailto:ASSEMBLER-
> LI...@LISTSERV.UGA.EDU] On Behalf Of Steve Thompson
> Sent: Wednesday, November 01, 2017 2:44 PM
> To: ASSEMBL...@LISTSERV.UGA.EDU
> Subject: Re: edmk instruction
>

Gray Gregory

unread,
Nov 2, 2017, 1:57:03 AM11/2/17
to ASSEMBL...@listserv.uga.edu
Great link, thanks but my question is, is there a fill character that will pad the pattern with zeros. I've even tried X'F0', and X'00' as the first character in the pattern.



from Greg Gray
gregor...@irs.gov
2406131660

Gray Gregory

unread,
Nov 2, 2017, 2:01:30 AM11/2/17
to ASSEMBL...@listserv.uga.edu
The customer doesn’t want any special characters i.e, comma, dollars signs, in the output field just the total amount in the output ds cl15 field: example: 000000003589342.



from Greg Gray
gregor...@irs.gov
2406131660

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBL...@listserv.uga.edu] On Behalf Of retired mainframer
Sent: Wednesday, November 01, 2017 8:33 PM
To: ASSEMBL...@listserv.uga.edu
Subject: Re: edmk instruction

Peter Hunkeler

unread,
Nov 2, 2017, 2:14:20 AM11/2/17
to ASSEMBL...@listserv.uga.edu
>UNPK CL15,PL7 would also accomplish this task, as you're not really using any of ED's power.


The rightmost byte in the CL15 field will have the "sign" in the left nibble. So an additional instruction after the UNPK is needed:
OI CL15+14,X'F0'


--
Peter Hunkeler

retired mainframer

unread,
Nov 2, 2017, 3:52:07 AM11/2/17
to ASSEMBL...@listserv.uga.edu
Since the X'F0' fill character should have done what you wanted, you need to show us what you did with it. We need the relevant parts of the program source, the original contents of the two operand areas, and the final contents of the pattern area.

> -----Original Message-----
> From: IBM Mainframe Assembler List [mailto:ASSEMBLER-
> LI...@LISTSERV.UGA.EDU] On Behalf Of Gray Gregory
> Sent: Wednesday, November 01, 2017 10:57 PM
> To: ASSEMBL...@LISTSERV.UGA.EDU
> Subject: Re: edmk instruction
>

Binyamin Dissen

unread,
Nov 2, 2017, 3:58:39 AM11/2/17
to ASSEMBL...@listserv.uga.edu
On Wed, 1 Nov 2017 15:07:06 -0400 Greg Gray <gregor...@IRS.GOV> wrote:

:>I have a field PL7 that contains a number (dollar amount) and I have to output that amount into a CL15 output field. The customer would like for the remaining characters other than the digits for the amount to be zeros, i.e., 000000000012391. I am trying to code a EDMK pattern with no success, has anyone ever completed such a task?

Well, first of all, a PL7 will have 13 digits, not 15.

But if you want all leading zeroes (and two extras?) included, EDMK is the
wrong tool.


UNPK ZFIELD,PFIELD
OI ZFIELD+L'ZFIELD-1,X'F0' fix sign

--
Binyamin Dissen <bdi...@dissensoftware.com>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel


Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.

Gray Gregory

unread,
Nov 2, 2017, 8:44:08 AM11/2/17
to ASSEMBL...@listserv.uga.edu
True and this way is simpler to bad there isn't a fill character for padding with zeros



from Greg Gray
gregor...@irs.gov
2406131660

-----Original Message-----

Steve Smith

unread,
Nov 2, 2017, 8:55:50 AM11/2/17
to ASSEMBL...@listserv.uga.edu
Prove it.

Pieter Wiid

unread,
Nov 2, 2017, 9:08:42 AM11/2/17
to ASSEMBL...@listserv.uga.edu
I can prove that it DOES work for fill char x'F0':

F872D160C276  2  ZAP        0352(08,R13),0630(03,R12) (0001A160)
000000000012345C       (00008276) 12345C
1711          8  XR         R01,R01 00000000    00000000
D209D100C26C  8  MVC        0256(010,R13),0620(R12) (0001A100)
F0206B2020206B202120
DF09D100D164  2  EDMK       0256(010,R13),0356(R13) (0001A100)
F0F0F0F0F1F26BF3F4     (0001A164) 0012345C0000000000
R01=0001A104
D609D100D100  4  OC         0256(010,R13),0256(R13) (0001A100)
F0F0F0F0F1F26BF3F4F5

Robin Vowels

unread,
Nov 2, 2017, 9:41:20 AM11/2/17
to ASSEMBL...@listserv.uga.edu
From: "Gray Gregory" <Gregor...@IRS.GOV>
Sent: Thursday, November 02, 2017 11:44 PM


> True and this way is simpler to bad there isn't a fill character for padding with zeros

The fill character to pad with zeros was given to you: "F0"

Robin Vowels

unread,
Nov 2, 2017, 9:47:13 AM11/2/17
to ASSEMBL...@listserv.uga.edu
From: "Gray Gregory" <Gregor...@IRS.GOV>
Sent: Thursday, November 02, 2017 11:44 PM


> True and this way is simpler to bad there isn't a fill character for padding with zeros

P.S. The fill character must be the first in the pattern.

Charles Mills

unread,
Nov 2, 2017, 10:03:11 AM11/2/17
to ASSEMBL...@listserv.uga.edu
I believe the fill character may be any character whatsoever.

Charles


-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBL...@LISTSERV.UGA.EDU]
On Behalf Of Robin Vowels
Sent: Thursday, November 2, 2017 6:49 AM
To: ASSEMBL...@LISTSERV.UGA.EDU
Subject: Re: edmk instruction

Charles Mills

unread,
Nov 2, 2017, 10:05:04 AM11/2/17
to ASSEMBL...@listserv.uga.edu
You must have mucked up something else. Either will "work" (in the sense that they will fill the output, although x'00' is not printable; you want x'F0').

Charles


-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBL...@LISTSERV.UGA.EDU] On Behalf Of Gray Gregory
Sent: Wednesday, November 1, 2017 10:57 PM
To: ASSEMBL...@LISTSERV.UGA.EDU
Subject: Re: edmk instruction

Gray Gregory

unread,
Nov 2, 2017, 11:22:56 AM11/2/17
to ASSEMBL...@listserv.uga.edu
What does your edit pattern looks like, I tried it with the X'F0' but the job abend with a S0C7



from Greg Gray
gregor...@irs.gov
2406131660

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBL...@listserv.uga.edu] On Behalf Of Pieter Wiid
Sent: Thursday, November 02, 2017 9:08 AM
To: ASSEMBL...@listserv.uga.edu
Subject: Re: edmk instruction

Robin Vowels

unread,
Nov 2, 2017, 11:30:31 AM11/2/17
to ASSEMBL...@listserv.uga.edu
From: "Gray Gregory" <Gregor...@IRS.GOV>
Sent: Friday, November 03, 2017 2:22 AM


> What does your edit pattern looks like, I tried it with the X'F0' but the job abend with a S0C7

You were given several EDMK patterns.

It's time you showed your code including the pattern.

Robin Vowels

unread,
Nov 2, 2017, 11:32:22 AM11/2/17
to ASSEMBL...@listserv.uga.edu
From: "Charles Mills" <char...@MCN.ORG>
Sent: Friday, November 03, 2017 1:03 AM


>I believe the fill character may be any character whatsoever.

It can be any character.

Gary Weinhold

unread,
Nov 2, 2017, 12:08:40 PM11/2/17
to ASSEMBL...@listserv.uga.edu
A S0C7 would probably be that your edit pattern did not have exactly the same number of x'20' and x'21' bytes as the input packed field has digits (e.g, 13 for a PL7).

You might want to review this: http://computer-programming-forum.com/10-asm370/9229bb76d676b7d7.htm

which seems to be a good explanation of how to use ED and EDMK.

Gary Weinhold
Senior Application Architect

DATAKINETICS | Data Performance & Optimization

Phone: +1.613.523.5500 x216<tel:+1.613.523.5500%20x216>
Email: wein...@dkl.com<mailto:wein...@dkl.com>

[http://www.dkl.com/wp-content/uploads/2015/07/dkl_logo.png]<http://www.dkl.com/>

Visit us online at www.DKL.com<http://www.dkl.com/>

[http://www.dkl.com/wp-content/uploads/2015/08/banner.png]<http://www.dkl.com/mailsig>

E-mail Notification: The information contained in this email and any attachments is confidential and may be subject to copyright or other intellectual property protection. If you are not the intended recipient, you are not authorized to use or disclose this information, and we request that you notify us by reply mail or telephone and delete the original message from your mail system.



__________
On 2017-11-02 11:32, Robin Vowels wrote:
From: "Gray Gregory" <Gregor...@IRS.GOV><mailto:Gregor...@IRS.GOV>

David Woolbright

unread,
Nov 2, 2017, 12:14:27 PM11/2/17
to ASSEMBL...@listserv.uga.edu
ZAP the packed field to a field that is one byte larger. Edit that with an
edit word that starts x'402021....'. Reference the result without the
first 3 bytes. I'm on the road and can't write the code, but that will
work. Let me know if I misinterpreted what you need.

Steve Thompson

unread,
Nov 2, 2017, 1:31:29 PM11/2/17
to ASSEMBL...@listserv.uga.edu
On 11/01/2017 08:33 PM, retired mainframer wrote:
> Where did the $ come from?

"Does the customer really want something like 00000$10245670 ?"

EDMK is for "floating" in a character, typically in the US, a "$".

So I used that example result to attempt to demonstrate what the
results might look like using EDMK with the edit pattern being
given.

Now we know s/he really doesn't want an edit pattern, so I do not
understand why the EDMK or ED instruction. But s/he may have
other things going on with this program that they may not be at
liberty to discuss.

Regards,
Steve Thompson

Gary Weinhold

unread,
Nov 2, 2017, 2:16:27 PM11/2/17
to ASSEMBL...@listserv.uga.edu
The biggest problem he has is that he wants to fill 15 bytes with a PL7 field and he really wants to use EDMK. A suggestions has been made on how to convert the field to PL8 and use UNPK and OI. One assumption we've made is that if the packed field is negative, he still wants the result to be positive.

I believe that an edit field of X'F0F021202020202020202020202020' (X'F0F021' ,12X'20') would work with ED/EDMK.

Gary Weinhold
Senior Application Architect

DATAKINETICS | Data Performance & Optimization

Phone: +1.613.523.5500 x216<tel:+1.613.523.5500%20x216>
Email: wein...@dkl.com<mailto:wein...@dkl.com>

[http://www.dkl.com/wp-content/uploads/2015/07/dkl_logo.png]<http://www.dkl.com/>

Visit us online at www.DKL.com<http://www.dkl.com/>

[http://www.dkl.com/wp-content/uploads/2015/08/banner.png]<http://www.dkl.com/mailsig>

E-mail Notification: The information contained in this email and any attachments is confidential and may be subject to copyright or other intellectual property protection. If you are not the intended recipient, you are not authorized to use or disclose this information, and we request that you notify us by reply mail or telephone and delete the original message from your mail system.



__________

Robin Vowels

unread,
Nov 8, 2017, 6:53:33 AM11/8/17
to ASSEMBL...@listserv.uga.edu
From: "Gray Gregory" <Gregor...@IRS.GOV>
Sent: Thursday, November 02, 2017 11:44 PM


True and this way is simpler to bad there isn't a fill character for padding with zeros

The fill character for padding with zeros is 'F0', that is, zero.

Robin Vowels

unread,
Nov 8, 2017, 7:00:18 AM11/8/17
to ASSEMBL...@listserv.uga.edu
From: "Gray Gregory" <Gregor...@IRS.GOV>
Sent: Thursday, November 02, 2017 4:56 PM


> Great link, thanks but my question is, is there a fill character that will pad the pattern with
> zeros. I've even tried X'F0', and X'00' as the first character in the pattern.

'00' can't do it because it is not a printable character.

'F0' as a fill character (the first in the pattern) will do it. You need to have
the digit force character '21' as the second character in the pattern.

To make this go, you will need a receiving field of length 2 more bytes than you want,
and then ignore the first two bytes.

Robin Vowels

unread,
Nov 8, 2017, 7:02:54 AM11/8/17
to ASSEMBL...@listserv.uga.edu
From: "Steve Smith" <sas...@GMAIL.COM>
Sent: Thursday, November 02, 2017 7:24 AM


> Maybe for you, but not in general.

For the OP's purpose, ED is sufficient.

> On Wed, Nov 1, 2017 at 4:05 PM, Pieter Wiid <pw...@mweb.co.za> wrote:
>> If you have a x'21' in the edit pattern, you may as well use ED instead of EDMK.

Pieter Wiid

unread,
Nov 8, 2017, 7:03:56 AM11/8/17
to ASSEMBL...@listserv.uga.edu
If the digit force is the second character, I found that GPR1 is not set
(can prove it with traces).
Thus, just use ED, or plain UNPK and OI the last byte with X'F0'

Robin Vowels

unread,
Nov 8, 2017, 7:07:53 AM11/8/17
to ASSEMBL...@listserv.uga.edu
From: "Steve Smith" <sas...@GMAIL.COM>
Sent: Thursday, November 02, 2017 6:30 AM


Yes, probably thousands have. "No success" is rather vague.

> MVC CL15,x'f0f0202020202020202020202020202020'
> ED CL15,PL7

Haven't checked, but you might need a X'21' character as well or
instead of the second X'F0'

> UNPK CL15,PL7 would also accomplish this task, as you're not really
> using any of ED's power.

You'll also need to zap the least significant byte to produce a zone code of X'F'.

On Wed, Nov 1, 2017 at 3:07 PM, Greg Gray <gregor...@irs.gov> wrote:
> I have a field PL7 that contains a number (dollar amount) and I have to output that amount into a
> CL15 output field. The customer would like for the remaining characters other than the digits for
> the amount to be zeros, i.e., 000000000012391. I am trying to code a EDMK pattern with no
> success, has anyone ever completed such a task?



--
sas

Steve Smith

unread,
Nov 8, 2017, 8:48:38 AM11/8/17
to ASSEMBL...@listserv.uga.edu
See below:

On Wed, Nov 8, 2017 at 7:09 AM, Robin Vowels <rob...@dodo.com.au> wrote:
> From: "Steve Smith" <sas...@GMAIL.COM>
> Sent: Thursday, November 02, 2017 6:30 AM
>
>
> Yes, probably thousands have. "No success" is rather vague.
>
>> MVC CL15,x'f0f0202020202020202020202020202020'
>> ED CL15,PL7
>
>
> Haven't checked, but you might need a X'21' character as well or
> instead of the second X'F0'

I did check. The second x'F0' is to pad the length up to 15
characters, per OP's spec.
Using '0' as the pad character is something of a special case; but it
fits the question asked.

>
>> UNPK CL15,PL7 would also accomplish this task, as you're not really
>> using any of ED's power.
>
>
> You'll also need to zap the least significant byte to produce a zone code of
> X'F'.
>

Only if UNPK is used. ED/EDMK will take care of it.

Steve Smith

unread,
Nov 8, 2017, 9:00:10 AM11/8/17
to ASSEMBL...@listserv.uga.edu
ED & EDMK are completely documented (of course) in the Principles of
Operation, including the rules for when and how EDMK sets (or doesn't
set) R1. It behooves you to understand those rules completely if you
use EDMK.

Actually trying it is good too.

sas
Reply all
Reply to author
Forward
0 new messages