Re: Automatic Variable Insertion
There is a very useful macro on the CBTTAPE called STRING. You can do something like STRING 'something ',(fielda,,T),' something else ',(0(R1),6,T),' Register 1 =',((R1),,X),INTO=somefield the STRING macro automatically puts the length of the string it builds into the SOMEFIELD in register 15 so you can STH R15 intop the first two bytes of the WTO field. the above assumes that fielda is a text field of some length, (the ",,T" tells it to truncate ending blanks), and in this case R1 points to some other field of undetermined length that you want the first 6 bytes of (only up to the first blank field in those 6 bytes), and R1 is printed out in 8 hex characters. The SHOWZOS command makes a lot of use of this macro, (also avaialable on the CBTTAPE) It's very useful in instances where you have a lot of variables of different formats that you need to move around or generate messages from. Brian Westerman
Re: A Tale of Interleaving WTO messages
I run into this issue a lot dealing with console automation. I found that if I prefix (or some other way) my messages with the exact time (down to the thousandths of a second) then you can see that what Jim has told you is demonstrably true. One problem with so many moving pieces is that they don't all get done at the same time or the same order we want them to. It frequently freaks some customers out that we (almost always) issue a response to a request before the request shows up on the console and in syslog they tend to show up several lines before the request. We actually had to add the ability to show what message we were processing in the text of the response because many (most) times, they are nowhere around each other or in any kind of order that they expect. So, especially when testing, I find that adding what time I think it is in the program is helpful, especially when we have multiple threads all going at once. Brian
Re: Conditional MVCL macro?
Can you share your $MVC macro? Brian On Tue, 20 Oct 2020 17:42:55 +, Christopher Y. Blaicher wrote: >We just got a z15 and I have not tested MVCL vs MVC loop, but on all prior >machines a MVC loop beat a MVCL up to about 32K. Over 32K MVCL is the way to >go. In our environment we rarely are moving more than 32K. We built a $MVC >macro with 3 parameters, destination, source and length and use that. > >FYI - MVCL is a micro-code (milli-code, call it what you want) instruction. >There is a hefty startup and end cost to micro-code instructions. MVCL only >really gets going when it can use the internal move page function. That has >to be moving whole pages and they have to be page aligned. CLCL and similar >instructions, at least used to, suffer the same type of startup costs. > >Chris Blaicher >Technical Architect >Precisely.com > > >-Original Message- >From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On >Behalf Of Mike Hochee >Sent: Tuesday, October 20, 2020 12:40 PM >To: ASSEMBLER-LIST@LISTSERV.UGA.EDU >Subject: Re: Conditional MVCL macro? > >This message originated Externally. Use proper judgement and caution with >attachments, links, or responses. > > >Really interesting thread to start the day with! > >Our experience has been that the MVC loops are typically faster, up to a >point, that being about 30-40 instructions in the pipeline and as mentioned, >and this seemed very processor dependent. However when source and target >operands happen to both be aligned on a page boundary, then the opportunity >exists for the async data mover to kick in if a move long is being used. I >think this applied to both MVCL and MVCLE, but not sure. So ideally a macro >would want to utilize both MVCs and MVCL/E. > >More grist for the mill! > >-Original Message- >From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On >Behalf Of baron_car...@technologist.com >Sent: Tuesday, October 20, 2020 12:12 PM >To: ASSEMBLER-LIST@LISTSERV.UGA.EDU >Subject: Re: Conditional MVCL macro? > >Caution! This message was sent from outside your organization. > >The COBOL compiler for a 4000 byte move, from to the same with OPT(2) generates > >LAY R10,5072(,R9) FROM >LA R7,1072(,R9) TO >MVC 0(256,R7),0(R10) >MVC 256(256,R7),256(R10) >MVC 512(256,R7),512(R10) >MVC 768(256,R7),768(R10) >MVC 1024(256,R7),1024(R10) >MVC 1280(256,R7),1280(R10) >MVC 1536(256,R7),1536(R10) >MVC 1792(256,R7),1792(R10) >MVC 2048(256,R7),2048(R10) >MVC 2304(256,R7),2304(R10) >MVC 2560(256,R7),2560(R10) >MVC 2816(256,R7),2816(R10) >MVC 3072(256,R7),3072(R10) >MVC 3328(256,R7),3328(R10) >MVC 3584(256,R7),3584(R10) >MVC 3840(160,R7),3840(R10) > >However for 5000 bytes it generates: > >LAY R7,6072(,R9) >LA R10,0(,R7) >LA R7,1072(,R9) >LHI R11,0x13 >EQU * >MVC 0(256,R7),0(R10) >LA R10,256(,R10) >LA R7,256(,R7) >BRCTR11,L0128 >MVC 0(136,R7),0(R10) > >And yes the change occurred at 4097 bytes. > > > >-Original Message- >From: IBM Mainframe Assembler List On Behalf >Of Charles Mills >Sent: Tuesday, October 20, 2020 10:54 >To: ASSEMBLER-LIST@LISTSERV.UGA.EDU >Subject: Re: Conditional MVCL macro? > >@Ed, can you elaborate a little on your reasoning? (Not doubting it; just >curious.) Is it that the interruptibility provides a significant improvement >over MVCL? Or the support for lengths greater than 16M? Or ... ? > >When I asked Dr. Shum about move strategies he seemed to indicate that for >data that was already or would soon anyway be in cache an MVC loop was >generally faster than MVCL. (I did not ask about MVCLE at the time; not sure >why. He did not suggest it.) > >Charles > > >-Original Message- >From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] >On Behalf Of Ed Jaffe >Sent: Tuesday, October 20, 2020 6:52 AM >To: ASSEMBLER-LIST@LISTSERV.UGA.EDU >Subject: Re: Conditional MVCL macro? > >We've switched almost exclusively to MVCLE except for short, fixed-length >moves.
Re: Converting TIMEUSED macro output to printable time used
On this run, the job ran for ~23 seconds and used the following: IEF373I STEP/SOAKER /START 2019264.1453 IEF032I STEP/SOAKER /STOP 2019264.1453 CPU: 0 HR 00 MIN 17.17 SECSRB: 0 HR 00 MIN 01.86 SEC VIRT: 8K SYS: 240K EXT:0K SYS:10788K ATB- REAL:20K SLOTS: 0K VIRT- ALLOC: 10M SHRD: 0M the code and the values are as follows: TIMEUSED STORADR=DBLWD1 >>>>> dblwd1 at this point is B57E2F00 LM R0,R1,DBLWD1 SRDL R0,12 D R0,K1 CVD R1,DBLWD2 >>>>> R1 at this point is 004A STRING (DBLWD2+4,P,L),INTO=CPUTIME >>>>> CPUTIME at this point is 74 Which doesn't really make any sense to me as >>>>> I would expect it to be somewhere around 17. K1 DCF'1' On Sat, 21 Sep 2019 22:11:01 +0300, Binyamin Dissen wrote: >I would suggest looking at the value in DBLWD1. Then you can figure out what >to do. > >On Sat, 21 Sep 2019 06:26:16 -0400 Brian Westerman > wrote: > >:>I know I'm doing something wrong, but I can't get the output from TIMEUSED >to give me a valid time used > >:>In the program I have > >:> TIMEUSED STORADR=DBLWD1 >:> LM R0,R1,DBLWD1 >:> SRDL R0,12 >:> D R0,K1 >:> CVD R1,DBLWD2 >:> STRING (DBLWD2+4,P,L),INTO=CPUTIME > >:>K1 DCF'1' > >:>What I end up with in CPUTIME is (in this case) 324 for a job that ran all >of 3 seconds (wall clock time) when my job stats show: >:>CPU: 0 HR 01 MIN 05.27 SECSRB: 0 HR 00 MIN 06.53 SEC > >:>I should be getting something like 65 (unless SRB is included when I would >expect 71) > >:>I am obviously doing something wrong. I tried it using load grande and got >the same results, so I went back to LM. > >:>any help at all would be appreciated. > >-- >Binyamin Dissen >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.
Re: Converting TIMEUSED macro output to printable time used
Sorry, I said 3 seconds and I meant 3 minutes of wall clock time. Brian
Converting TIMEUSED macro output to printable time used
I know I'm doing something wrong, but I can't get the output from TIMEUSED to give me a valid time used In the program I have TIMEUSED STORADR=DBLWD1 LM R0,R1,DBLWD1 SRDL R0,12 D R0,K1 CVD R1,DBLWD2 STRING (DBLWD2+4,P,L),INTO=CPUTIME K1 DCF'1' What I end up with in CPUTIME is (in this case) 324 for a job that ran all of 3 seconds (wall clock time) when my job stats show: CPU: 0 HR 01 MIN 05.27 SECSRB: 0 HR 00 MIN 06.53 SEC I should be getting something like 65 (unless SRB is included when I would expect 71) I am obviously doing something wrong. I tried it using load grande and got the same results, so I went back to LM. any help at all would be appreciated. Brian
Re: Relinking a module with AC(1)
Rather than get into if you "should" or not, if you decide you want to, rather than re-link at all, you can use the PDS command processor to set AUTH on for the module. ATTRIB membername AUTH (you can also use ATTRIB membername APF) Brian
Re: Calculate elapsed time from MM/DD/YY HH:MM:SS formats
Overkill for this implementation. Thanks, Brian On Thu, 5 Jan 2012 17:26:24 +0100, Paul Saers wrote: >Since we are down to seconds, dont forget the leap seconds. Leap >second 34 was inserted at the end of 31dec2008 and number 35 will be >inserted at the end of 30june2012 (all time is UTC). IBM operating >systems have so far been up to taking care of this insertions via >timely PTF's. The Principles of Operations will most likely be updated >as new versions come out. >/Paul Saers > >On Thu, Jan 5, 2012 at 15:26, Martin Truebner wrote: >> John >> ...and if you find anything about the lines I have written puzzling, you should use >> one. >> >> Good one- I will for sure use it. >> >> -- >> Martin >> >> Pi_cap_CPU - all you ever need around MWLC/SCRT/CMT in z/VSE >> more at http://www.picapcpu.de
Re: Calculate elapsed time from MM/DD/YY HH:MM:SS formats
On Thu, 5 Jan 2012 09:15:31 -0500, John Gilmore wrote: >Assuming that hh.mm.ss values are 24-hour clock ones---0 <= hh <= 23, >0 <= mm <= 59, and 0 <= ss <= 59---the fractional part of a day >represented by such a value is given by first calculating the number >of seconds it represents as > >S = (hh x 3600 + mm x 60 + ss) = 60 x (hh x 60) + ss > >Then, since there are 24 x 60 x 60 = 86400 seconds in a day, the >fractional part of a day F represented by an hh.mm.ss value is just > >F = S/86400. > >The Gregorian Day, negative, zero, or positive number of elapsed days >since the epoch origin of the Gregorian calendar ( December 31, >midnight) in obvious y, m, d notation is given by > > p = y - 1 --serial number, preceding year > G = 365p--include 365 days, every preceding year > + p/4--include preceding Julian leap years > - p/100--exclude all Gregorian centurial years > + p/400 --include Gregorian centurial leap years > + CDIMT(m) --include preceding months' days (table) > + d --include current month's days > >in which DDIMT(1:12) has the elements > > 0,31,59,90,120,151,181,212,243,273,304,334 [,365] > >in a non-leap year and the elements > > 0,31,60,91,121,152,182,213,244,274,305,335 [,366] > >in a leap year. > >The determination of a leap year mirrors that of the pseudo-PL/I >statement > > leap = (mod(y,4) = 0) & (mod(y,100) �= 0)) > | (mod(y,400) = 0) & (y �= 3600) ; > >in which the BIF mod is defined as it is in mathematics and PL/I, >NOT as the remainder operation is defined in C. > >If your GD value is a signed fullword one, dates about 58 million >years before and after the Gregorian-calendar epoch origin can be >represented. This is enough for most business purposes, but this >scheme can be used mutatis mutandis with signed doubleword integers if >not > >There are LE library routines that do things like this, and if you >find anything about the lines I have written puzzling, you should use >one. > >John Gilmore, Ashland, MA 01721 - USA Thanks, but I think the CONVTOD will do what I want. I already have the code I originally wrote now working, (I had messed up and where I subtracted 60, I should have subtracted 24, it fixed the problem), but I think the CONVTOD might work out to less code since I don't have to do a lot of what I do now. I won't know until I give it a shot this weekend. Brian
Re: Calculate elapsed time from MM/DD/YY HH:MM:SS formats
So use CONVTOD to convert both times to TOD or ETOD and subbtract, then convert back? Seems like a good idea, I'll give it a shot. Brian
Re: Calculate elapsed time from MM/DD/YY HH:MM:SS formats
On Wed, 4 Jan 2012 20:17:06 -0700, Paul Gilmartin wrote: >On Jan 4, 2012, at 19:21, Brian Westerman wrote: >> >> In the past I have always calculated elapsed time via starting with the STCK >> times, subtracting them and then converting them to a readable format, but >> in this case I have the fields already as start-MM/DD/YY HH:MM:SS >> end-MM/DD/YY HH:MM:SS. >> >> When I work backwards from seconds to hours, I keep getting screwed up on >> the days part. Is there an already existing program I can copy that someone >> can share before I drive myself nuts? (well, more nuts). >> >http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/edclb1b0/3.186 >http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/edclb1b0/3.616 > >-- gil That's great, but not assembler. I don't want to be an assembler bigot, but I don't want to move outside of assembler if I don't absolutely have to. I have the logic in my mind and it's fairly trivial so the overhead of loading C is not what I am looking for. But thanks for the help. Brian
Calculate elapsed time from MM/DD/YY HH:MM:SS formats
Hi, I have a module that I created many years ago that computes the number of days between two dates, but I have been asked if there is a way to expand it to compute the total time between the two dates as well (if supplied with the HH:MM:SS as well). In the past I have always calculated elapsed time via starting with the STCK times, subtracting them and then converting them to a readable format, but in this case I have the fields already as start-MM/DD/YY HH:MM:SS end-MM/DD/YY HH:MM:SS. When I work backwards from seconds to hours, I keep getting screwed up on the days part. Is there an already existing program I can copy that someone can share before I drive myself nuts? (well, more nuts). Thanks, Brian
How to code TAM instruction
Hi, I got a call from a friend who "needs" to use the TAM instruction. I have never had to use it, and I tried to look it up, but could not really find any examples. I know that the RC from it gives CC0=24bit, CC1=32it and CC3=64bit, but I've searched everywhere and can't find any samples or examples. Does anyone have one that I can pass on? Thanks, Brian Westerman