Re: Cobol question

2023-07-12 Thread Massimo Biancucci
Rex, at this link you'll find an interesting thread: https://groups.google.com/g/bit.listserv.ibm-main/c/B04G-HasOd4 As somebody (who is at least 30K light years beyond me) probably the right way is to use TIMEUSED macro. It depends on how much you need to rely the info. I recently wrote an

Re: Cobol question

2023-07-11 Thread Joe Monk
You can always map the TCB and reference field TCBTTIME to get the accumulated CPU time for the task - I think its offset 316 decimal. Joe On Tue, Jul 11, 2023 at 4:22 PM Pommier, Rex wrote: > Hey all, > > I just got this tossed at me by an application developer. Cobol 6.3. Is > there some

Cobol question

2023-07-11 Thread Pommier, Rex
Hey all, I just got this tossed at me by an application developer. Cobol 6.3. Is there some built-in function or something that they can put into a program to report out the amount of CPU (TCB) time the program has consumed thus far in execution of the program? We have a program that

Re: COBOL question: How to dynamically get the name of the routine that called you

2023-05-02 Thread Farley, Peter
Thanks Michael, I tried your routine here and it did exactly what I needed, so thank you. Peter -Original Message- From: IBM Mainframe Discussion List On Behalf Of Schmitt, Michael Sent: Tuesday, May 2, 2023 3:06 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL question: How

Re: COBOL question: How to dynamically get the name of the routine that called you

2023-05-02 Thread Bernd Oppolzer
AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: COBOL question: How to dynamically get the name of the routine that called you This is an Enterprise COBOL V5/6 question. No earlier compiler versions are involved. Is it possible for a called COBOL program to dynamically determine the name of the calling CO

Re: COBOL question: How to dynamically get the name of the routine that called you

2023-05-02 Thread Schmitt, Michael
I am attempting to post the assembler program here for reference, we'll see if the listserv accepts it without mangling. To use, call it passing the area you want it to return the calling program name in. The call_level_e equate controls how many levels up it goes. -- setc

Re: COBOL question: How to dynamically get the name of the routine that called you

2023-05-02 Thread Joe Monk
know if you're interested in the assembler program. > > > * assuming the program follows standard conventions for the program id > signature string. > > -Original Message- > From: IBM Mainframe Discussion List On Behalf > Of Farley, Peter > Sent: Tuesday, May

Re: COBOL question: How to dynamically get the name of the routine that called you

2023-05-02 Thread Schmitt, Michael
:23 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: COBOL question: How to dynamically get the name of the routine that called you This is an Enterprise COBOL V5/6 question. No earlier compiler versions are involved. Is it possible for a called COBOL program to dynamically determine the name of the calling

COBOL question: How to dynamically get the name of the routine that called you

2023-05-02 Thread Farley, Peter
This is an Enterprise COBOL V5/6 question. No earlier compiler versions are involved. Is it possible for a called COBOL program to dynamically determine the name of the calling COBOL program (i.e., the PROGRAM-ID value)? I have been reading the LE Vendor Interfaces manual but I have yet to

Re: COBOL question

2023-04-10 Thread Cameron Conacher
AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: [External] Re: COBOL question A lot of times, U4038 is not enough region... Joe On Mon, Apr 10, 2023 at 6:15 AM Cameron Conacher < 03cfc59146bb-dmarc-requ...@listserv.ua.edu<mailto:03cfc59146bb-dmarc-requ...@listserv.ua.edu>> wrot

Re: COBOL question

2023-04-10 Thread Joe Monk
g it might be related to EXPEDITER. > > That is my current WAG. > > > Thanks > > …….Cameron > > -Original Message- > From: IBM Mainframe Discussion List On Behalf > Of Charles Mills > Sent: Sunday, April 9, 2023 8:07 PM > To: IBM-MAIN@LISTSERV.UA.EDU > S

Re: COBOL question

2023-04-10 Thread Cameron Conacher
, 2023 8:07 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: [External] Re: COBOL question I can't see your code of course but my WAG is a programmer logic error. (Sorry!) I am going to guess your logic is such that you try to free the same area twice or, less likely, corrupt your pointer. You say you

Re: COBOL question

2023-04-09 Thread Charles Mills
I can't see your code of course but my WAG is a programmer logic error. (Sorry!) I am going to guess your logic is such that you try to free the same area twice or, less likely, corrupt your pointer. You say you check to see if it is null before freeing. Do you set it to NULL after freeing?

Re: COBOL question

2023-04-09 Thread Cameron Conacher
: Saturday, April 8, 2023 8:50 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: [External] Re: COBOL question Region card big enough? I’ve seen that abend via not enough memory. Bob Sent from Proton Mail for iOS On Sat, Apr 8, 2023 at 8:17 PM, Charles Hardee wrote: > I have not seen this exactly like w

Re: COBOL question

2023-04-08 Thread Bob T Roller
Region card big enough? I’ve seen that abend via not enough memory. Bob Sent from Proton Mail for iOS On Sat, Apr 8, 2023 at 8:17 PM, Charles Hardee wrote: > I have not seen this exactly like what you describe, but I do have some > thoughts. > The pointer you are using for the ALLOCATE, does

Re: COBOL question

2023-04-08 Thread Charles Hardee
I have not seen this exactly like what you describe, but I do have some thoughts. The pointer you are using for the ALLOCATE, does it have a value clause, specifically VALUE NULL. If not, the pointer could have an unknown value that does not compare equal to NULL so you would attempt to FREE it.

COBOL question

2023-04-08 Thread Cameron Conacher
Hello folks I have written an IMS COBOL program. I have included a couple of ALLOCATE statements. At the end of processing I check my pointers and if they are not NULL I try to FREE. This results in a U4038 abend. At least inside Expediter. I have not used ALLOCATE/FREE before. I am thinking

Re: COBOL Question

2020-06-09 Thread Steve Beaver
I liked Panvalet. Sent from my iPhone I promise you I can’t type or Spell on any smartphone > On Jun 9, 2020, at 15:53, David Spiegel wrote: > > +1 sleazy-freaking-trieve. > (I used to support it, Panvalet and Librarian) > >> On 2020-06-09 16:27, Joe Monk wrote: >> "Easytrieve plus" >>

Re: COBOL Question

2020-06-09 Thread David Spiegel
+1 sleazy-freaking-trieve. (I used to support it, Panvalet and Librarian) On 2020-06-09 16:27, Joe Monk wrote: "Easytrieve plus" You mean sleazytrieve plus? :) There was also DYL280 and QUIKJOB. Joe On Tue, Jun 9, 2020 at 12:55 PM Mike Schwab wrote: 4GL - I've used Telon which takes a

Re: COBOL Question

2020-06-09 Thread Jackson, Rob
On Behalf Of John McKown Sent: Tuesday, June 9, 2020 4:43 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question [External Email. Exercise caution when clicking links or opening attachments.] On Tue, Jun 9, 2020 at 3:28 PM Joe Monk wrote: > "Easytrieve plus" > > You mea

Re: COBOL Question

2020-06-09 Thread John McKown
On Tue, Jun 9, 2020 at 3:28 PM Joe Monk wrote: > "Easytrieve plus" > > You mean sleazytrieve plus? :) > We still use SleavyTrieve+ in production. Crap, we have some RACF reports, written over 28 years ago (before my time) which use EZTP to parse the output of an "LU *". I really should replace

Re: COBOL Question

2020-06-09 Thread John Clifford
I used quikjob for nearly 20 years as a systems pgmr. It was a very simple yet powerful product. It also had several other quikxxx modules to handle vsam easily and a report module to make very neat reports from bland data. I think the company got bought out and the products renamed at some point

Re: COBOL Question

2020-06-09 Thread Steve Beaver
I have not see sleazytrieve on 20 years Sent from my iPhone > On Jun 9, 2020, at 15:27, Joe Monk wrote: > > "Easytrieve plus" > > You mean sleazytrieve plus? :) > > There was also DYL280 and QUIKJOB. > > Joe > >> On Tue, Jun 9, 2020 at 12:55 PM Mike Schwab wrote: >> >> 4GL - I've used

Re: COBOL Question

2020-06-09 Thread Joe Monk
"Easytrieve plus" You mean sleazytrieve plus? :) There was also DYL280 and QUIKJOB. Joe On Tue, Jun 9, 2020 at 12:55 PM Mike Schwab wrote: > 4GL - I've used Telon which takes a screen layout and database layout > and generates the cobol code and editing rules. ADR-Datacom had Ideal > which

Re: COBOL Question

2020-06-09 Thread Mike Schwab
4GL - I've used Telon which takes a screen layout and database layout and generates the cobol code and editing rules. ADR-Datacom had Ideal which was similar, later CA. Easytrieve plus I really liked, especially the report generation part.

Re: COBOL Question

2020-06-09 Thread Seymour J Metz
-MAIN@LISTSERV.UA.EDU] on behalf of Frank Swarbrick [frank.swarbr...@outlook.com] Sent: Tuesday, June 9, 2020 12:02 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question I don't know what any of those terms even mean, so I'll not attempt to answer. My interest in learning Fortran is more

Re: COBOL Question

2020-06-09 Thread Frank Swarbrick
: Tuesday, June 9, 2020 9:19 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question Partially. Does Fortran now have reduction operators, e.g., inner product, trace? -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 From: IBM Mainframe

Re: COBOL Question

2020-06-09 Thread Seymour J Metz
...@outlook.com] Sent: Tuesday, June 9, 2020 10:42 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question Do you mean like this? integer, dimension(10) :: a, b, c a = [1,2,3,4,5,6,7,8,9,10] b = [2,3,4,5,6,7,8,9,10,11] c = a + b print *, "a = ", a print *, "b = ",

Re: COBOL Question

2020-06-09 Thread Frank Swarbrick
Subject: Re: COBOL Question What about gcc Fortran? Does that run on OMVS? Linux on Z? -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Frank Swarbrick [frank.swarbr

Re: COBOL Question

2020-06-09 Thread Frank Swarbrick
21 Apparently added as part of the Fortran 90 standard. From: IBM Mainframe Discussion List on behalf of Seymour J Metz Sent: Tuesday, June 9, 2020 8:16 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question Have they added array operations to Fortran? --

Re: COBOL Question

2020-06-09 Thread Seymour J Metz
, June 9, 2020 10:22 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question Here's the question I have about Fortran support. Why does IBM support modern Fortran on platforms like Linux and AIX, but mainframe Fortran (IBM VS FORTRAN) is still at FORTRAN 77 level and seems to have had

Re: COBOL Question

2020-06-09 Thread Frank Swarbrick
were a Fortran developer this would piss me off greatly. From: IBM Mainframe Discussion List on behalf of Evans-Young, Darren Sent: Monday, June 8, 2020 8:16 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question FORTRAN 90 was a significant upgrade over

Re: COBOL Question

2020-06-09 Thread Seymour J Metz
To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question I haven't written anything in FORTRAN since some time in the late '70s. But even much more recently I heard it's regarded by number crunchers, engineers say, as the best language for sheer speed. Not so great for report writing and formatting

Re: COBOL Question

2020-06-09 Thread Seymour J Metz
From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Bob Bridges [robhbrid...@gmail.com] Sent: Tuesday, June 9, 2020 12:49 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question LOL! I'm reminded that DYL-280II was advertised as a 4GL, with English-like syntax

Re: Goto Statements AND COBOL OPTIMIZATION (was: COBOL Question)

2020-06-09 Thread Clark Morris
[Default] On 8 Jun 2020 01:55:52 -0700, in bit.listserv.ibm-main dcrayf...@gmail.com (David Crayford) wrote: >I learned JSP back in the early 90's. It was popular in the UK (Jackson >was British) and most large mainframe companies adopted it. It was good. >There was even tooling that >could

Re: COBOL Question

2020-06-09 Thread Jousma, David
, SE  |  MD RSCB2H  |  Grand Rapids, MI 49546 616.653.8429  |  fax: 616.653.2717 -Original Message- From: IBM Mainframe Discussion List On Behalf Of Evans-Young, Darren Sent: Monday, June 8, 2020 10:16 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question **CAUTION EXTERNAL EMAIL

Re: COBOL Question

2020-06-08 Thread Bob Bridges
LOL! I'm reminded that DYL-280II was advertised as a 4GL, with English-like syntax. Neither is true, to my mind. I like DYL-280II, and taught classes in it at my employer of the time (Volvo Truck NA) as well as workshops at the DYLAKOR conferences. But it's not a 4GL. Well, not in the

Re: COBOL Question

2020-06-08 Thread Bob Bridges
I haven't written anything in FORTRAN since some time in the late '70s. But even much more recently I heard it's regarded by number crunchers, engineers say, as the best language for sheer speed. Not so great for report writing and formatting. --- Bob Bridges, robhbrid...@gmail.com, cell 336

Re: COBOL Question

2020-06-08 Thread Paul Gilmartin
On Mon, 8 Jun 2020 20:50:12 -0500, Joe Monk wrote: >In this case, because we are PERFORMing THRU, then GO TO exit, merely >causes an iterate. > It's so nice of COBOL to be written in common language so any English speaker can intuitively grasp it correctly. >On Mon, Jun 8, 2020 at 7:36 PM Frank

Re: COBOL Question

2020-06-08 Thread Evans-Young, Darren
Mainframe Discussion List on behalf of lenru...@gmail.com Sent: Monday, June 8, 2020 8:52 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question On, long ago and on some DOS/VS Cobol compiler, after a compiler upgrade, there was a problem with a statement something like this: READ some

Re: COBOL Question

2020-06-08 Thread lenru...@gmail.com
ive years older than COBOL (Cobol?). From: IBM Mainframe Discussion List on behalf of Bob Bridges Sent: Sunday, June 7, 2020 12:35 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question The only language I can think of off-hand that doesn't require som

Re: COBOL Question

2020-06-08 Thread Joe Monk
st on behalf > of Joe Monk > Sent: Saturday, June 6, 2020 2:49 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: COBOL Question > > I think what you mean is this: > > PERFORM 1050-LOOP THRU 1059-EXIT VARYING JC FROM 1 BY 1 UNTIL JC = 99 > END-PERFORM > > 1

Re: COBOL Question

2020-06-08 Thread Frank Swarbrick
ran can even be forgiven for then, being I believe about five years older than COBOL (Cobol?). From: IBM Mainframe Discussion List on behalf of Bob Bridges Sent: Sunday, June 7, 2020 12:35 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question The only language

Re: COBOL Question

2020-06-08 Thread Frank Swarbrick
rris Sent: Saturday, June 6, 2020 12:28 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question [Default] On 6 Jun 2020 10:53:44 -0700, in bit.listserv.ibm-main robhbrid...@gmail.com (Bob Bridges) wrote: >Oh, you need an END-IF even for a single-statement IF? I forgot; I've been >thinking

Re: COBOL Question

2020-06-08 Thread Frank Swarbrick
_ From: IBM Mainframe Discussion List on behalf of Bob Bridges Sent: Saturday, June 6, 2020 11:53 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question Oh, you need an END-IF even for a single-statement IF? I forgot; I've been thinking in REXX too long. In that case you're close; I gue

Re: COBOL Question

2020-06-08 Thread Frank Swarbrick
ing" procedure will never reach its exit. From: IBM Mainframe Discussion List on behalf of Joe Monk Sent: Saturday, June 6, 2020 2:49 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question I think what you mean is this: PERFORM 1050-LOOP THRU 1059-EXIT

Re: COBOL Question

2020-06-08 Thread Frank Swarbrick
of Bob Bridges Sent: Friday, June 5, 2020 11:42 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question I realize this is a bit of a change in subject (and it's not as if we need yet another one), but I avoid this construction. My phobia is based on an extreme example: In their zeal never t

Re: COBOL Question

2020-06-08 Thread Seymour J Metz
@LISTSERV.UA.EDU Subject: Re: COBOL Question For brevity, if you don't like DO END. select when idx="T" then countt=countt+1 when idx="U" then countu=countu+1 when idx="V" then countv=countv+1 when idx="W" then countw=countw+1 other

Re: Goto Statements (was: COBOL Question)

2020-06-08 Thread Seymour J Metz
] Sent: Monday, June 8, 2020 4:28 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Goto Statements (was: COBOL Question) Dijkstra wrote his missive around 1968. Knuth made a meal of it and after reading his paper which was published 5 years later, it was too hard a read. Around the same time Michael

Re: Goto Statements (was: COBOL Question)

2020-06-08 Thread David Crayford
I learned JSP back in the early 90's. It was popular in the UK (Jackson was British) and most large mainframe companies adopted it. It was good. There was even tooling that could create code from charts. Dijkstra's paper is one of the most controversial CS papers ever written. It was written

Re: Goto Statements (was: COBOL Question)

2020-06-08 Thread Wayne Bickerdike
Dijkstra wrote his missive around 1968. Knuth made a meal of it and after reading his paper which was published 5 years later, it was too hard a read. Around the same time Michael Jackson was distilling this information and produced his structured programming book "Principles of Program Design".

Re: Goto Statements (was: COBOL Question)

2020-06-08 Thread David Crayford
On 2020-06-07 10:48 PM, Paul Gilmartin wrote: I consider the out of line PERFORM to be far more dangerous. I have a similar issue with REXX; it does not have lexical scope, and you can fall into a procedure. A noteworthy 1976 paper (behind a paywall): Software malpractice — a

Re: COBOL Question

2020-06-08 Thread Wayne Bickerdike
Results: 1 0 0 0 *** On Mon, Jun 8, 2020 at 4:06 PM Wayne Bickerdike wrote: > /* REXX */ > COUNTT = 0 > COUNTU = 0 > COUNTV = 0 > COUNTW = 0 > TAB.T = "COUNTT=COUNTT+1" > TAB.U = "COUNTU=COUNTU+1" > TAB.V = "COUNTV=COUNTV+1" > TAB.W = "COUNTW=COUNTW+1" > IDX = 'T' > > INTERPRET

Re: COBOL Question

2020-06-08 Thread Wayne Bickerdike
/* REXX */ COUNTT = 0 COUNTU = 0 COUNTV = 0 COUNTW = 0 TAB.T = "COUNTT=COUNTT+1" TAB.U = "COUNTU=COUNTU+1" TAB.V = "COUNTV=COUNTV+1" TAB.W = "COUNTW=COUNTW+1" IDX = 'T' INTERPRET TAB.IDX SAY COUNTT SAY COUNTU SAY COUNTV SAY COUNTW On Mon, Jun 8, 2020 at 3:10 PM Wayne Bickerdike

Re: COBOL Question

2020-06-07 Thread Wayne Bickerdike
Forgot the quotes! On Mon, Jun 8, 2020 at 3:07 PM Wayne Bickerdike wrote: > Or to be controversial: > > tab.T = countt=countT+1 > tab.U = countU=countU+1 > tab.V = countV=countV+1 > tab.W = countW=countW+1 > > INTERPRET tab.idx > > On Mon, Jun 8, 2020 at 3:01 PM Wayne Bickerdike wrote: > >>

Re: COBOL Question

2020-06-07 Thread Wayne Bickerdike
Or to be controversial: tab.T = countt=countT+1 tab.U = countU=countU+1 tab.V = countV=countV+1 tab.W = countW=countW+1 INTERPRET tab.idx On Mon, Jun 8, 2020 at 3:01 PM Wayne Bickerdike wrote: > CA-IDEAL has SELECT FIRST ACTION AND SELECT EVERY ACTION. That I like. > > On Mon, Jun 8, 2020 at

Re: COBOL Question

2020-06-07 Thread Wayne Bickerdike
CA-IDEAL has SELECT FIRST ACTION AND SELECT EVERY ACTION. That I like. On Mon, Jun 8, 2020 at 2:59 PM Wayne Bickerdike wrote: > For brevity, if you don't like DO END. > > select > when idx="T" then countt=countt+1 > when idx="U" then countu=countu+1 > when idx="V" then

Re: COBOL Question

2020-06-07 Thread Wayne Bickerdike
For brevity, if you don't like DO END. select when idx="T" then countt=countt+1 when idx="U" then countu=countu+1 when idx="V" then countv=countv+1 when idx="W" then countw=countw+1 otherwise countx=countx+1; end Could be : SELECT( idx) when ("T") then

Re: COBOL Question

2020-06-07 Thread Bob Bridges
No, I wasn't complaining about the SELECT statement, only about using lots of DO/statement/ENDs when there's only a single statement. I would code the same thing like this: select when idx="T" then countt=countt+1 when idx="U" then countu=countu+1 when idx="V" then

Re: COBOL Question

2020-06-07 Thread Seymour J Metz
: COBOL Question Don’t forget the SKELETON language. Sent from my iPhone — small keyboarf, fat fungrs, stupd spell manglr. Expct mistaks > On Jun 7, 2020, at 4:30 PM, Seymour J Metz wrote: > >  1. ISPF is not a language.If you are referring to panel definition > statements, >

Re: COBOL Question

2020-06-07 Thread Steve Thompson
consensus. > > > -- > Shmuel (Seymour J.) Metz > http://mason.gmu.edu/~smetz3 > > > From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of > Bob Bridges [robhbrid...@gmail.com] > Sent: Sunday, June 7, 2020

Re: Goto Statements (was: COBOL Question)

2020-06-07 Thread Seymour J Metz
://mason.gmu.edu/~smetz3 From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Clark Morris [cfmt...@uniserve.com] Sent: Sunday, June 7, 2020 2:05 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Goto Statements (was: COBOL Question) [Default

Re: COBOL Question

2020-06-07 Thread Seymour J Metz
] Sent: Sunday, June 7, 2020 2:35 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question The only language I can think of off-hand that doesn't require some sort of END to close a DO (I'm sure there are others) is ISPF. But, in REXX at least, I never use single-statement DOs. I see them all

Re: COBOL Question

2020-06-07 Thread Seymour J Metz
PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question You could not be more correct. You wrote NOT and I translated that in my head to the exclamation point. (My C is showing.) And yes, absolutely, as you say, the problem is the merging of logical not and XOR operations. The link below

Re: COBOL Question

2020-06-07 Thread Charles Mills
ERV.UA.EDU] On Behalf Of Bob Bridges Sent: Sunday, June 7, 2020 11:53 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question You must have misread me somehow, Mr Mills; I didn't say there's a '!' operator in VBA. You spoke of a '!' operator in C, but I've never heard of that operator in

Re: COBOL Question

2020-06-07 Thread Bob Bridges
You must have misread me somehow, Mr Mills; I didn't say there's a '!' operator in VBA. You spoke of a '!' operator in C, but I've never heard of that operator in VBA; all I meant is that maybe I should look in VBA for another Boolean operator that is different from NOT as you say '!' is

Re: COBOL Question

2020-06-07 Thread Lou Losee
Bob, Would you rather code the select as a series of nested if-then-else? Lou On Sun, Jun 7, 2020 at 1:35 PM Bob Bridges wrote: > The only language I can think of off-hand that doesn't require some sort > of END to close a DO (I'm sure there are others) is ISPF. But, in REXX at > least, I

Re: COBOL Question

2020-06-07 Thread Bob Bridges
The only language I can think of off-hand that doesn't require some sort of END to close a DO (I'm sure there are others) is ISPF. But, in REXX at least, I never use single-statement DOs. I see them all the time, and I don't get it. Like this: if x=0 then do x=x+1 end Or, more

Re: Goto Statements (was: COBOL Question)

2020-06-07 Thread Clark Morris
[Default] On 7 Jun 2020 03:33:44 -0700, in bit.listserv.ibm-main sme...@gmu.edu (Seymour J Metz) wrote: >I generally get by with control structures like case (select/when), >if/elsif/when, iterate and leave, but I unashamedly use GOTO, when it is the >cleanest way to do something; I refuse to

Re: Goto Statements (was: COBOL Question)

2020-06-07 Thread Seymour J Metz
on.gmu.edu/~smetz3 From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Paul Gilmartin [000433f07816-dmarc-requ...@listserv.ua.edu] Sent: Sunday, June 7, 2020 10:48 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Goto Statements (was: COBO

Re: Goto Statements (was: COBOL Question)

2020-06-07 Thread Paul Gilmartin
On Sun, 7 Jun 2020 10:33:34 +, Seymour J Metz wrote: >I generally get by with control structures like case (select/when), >if/elsif/when, iterate and leave, but I unashamedly use GOTO, when it is the >cleanest way to do something; I refuse to avoid a useful construct just >because it is

Re: COBOL Question

2020-06-07 Thread David Crayford
If you really believe this nonsense then you have never programmed systems level code which requires cleanup of system resources such as locks. In 2020 we should not be having this conversation any more - it's bogus! Nobody emulates structured programming constructs such as loops using goto

Re: COBOL Question

2020-06-07 Thread David Crayford
I've posted this before many times before! The conversation has got boring now - yawn! I would challenge anybody to refactor this code without goto's. https://github.com/eclipse/omr/blob/e9b85117d18c369108a9ddb790023103c35b4379/thread/common/omrthread.c#L246 On 2020-06-07 1:53 AM, Bob

Re: Goto Statements (was: COBOL Question)

2020-06-07 Thread Seymour J Metz
@LISTSERV.UA.EDU] on behalf of Bernd Oppolzer [bernd.oppol...@t-online.de] Sent: Sunday, June 7, 2020 6:17 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Goto Statements (was: COBOL Question) Thank you very much for the link to that article; I did not know that before. When I started to work on the Stanford

Goto Statements (was: COBOL Question)

2020-06-07 Thread Bernd Oppolzer
Thank you very much for the link to that article; I did not know that before. When I started to work on the Stanford Pascal compiler in 2011, it had about 20 to 30 labels and Gotos (6000 lines of source code). http://bernd-oppolzer.de/job9.htm In the meantime, I omitted most of them, but

Re: COBOL Question

2020-06-06 Thread Seymour J Metz
://mason.gmu.edu/~smetz3 From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Bernd Oppolzer [bernd.oppol...@t-online.de] Sent: Friday, June 5, 2020 7:34 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question This triggered me

Re: COBOL Question

2020-06-06 Thread Seymour J Metz
: Saturday, June 6, 2020 1:53 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question Oh, you need an END-IF even for a single-statement IF? I forgot; I've been thinking in REXX too long. In that case you're close; I guess I really meant PERFORM 1050-LOOP THRU 1050-EXIT VARYING JC FROM 1 BY 1

Re: COBOL Question

2020-06-06 Thread Seymour J Metz
...@listserv.ua.edu] Sent: Saturday, June 6, 2020 2:40 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question On Sat, 6 Jun 2020 15:28:57 -0300, Clark Morris wrote: >On 6 Jun 2020 10:53:44 -0700, (Bob Bridges) wrote: > >>Oh, you need an END-IF even for a single-statement IF? I forgo

Re: COBOL Question

2020-06-06 Thread Clark Morris
[Default] On 6 Jun 2020 12:43:09 -0700, in bit.listserv.ibm-main joemon...@gmail.com (Joe Monk) wrote: >Granted its been awhile since ive done application code, but if you >dont end-if they become a nested condition, which I dont think was the >original intent. A conditional statement in COBOL

Re: COBOL Question

2020-06-06 Thread Joe Monk
Granted its been awhile since ive done application code, but if you dont end-if they become a nested condition, which I dont think was the original intent. Joe On Sat, Jun 6, 2020 at 1:40 PM Paul Gilmartin < 000433f07816-dmarc-requ...@listserv.ua.edu> wrote: > On Sat, 6 Jun 2020 15:28:57

Re: COBOL Question

2020-06-06 Thread Charles Mills
Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Bob Bridges Sent: Saturday, June 6, 2020 10:57 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question Really, a different operator? I didn't know; I bought a C compiler once,

Re: COBOL Question

2020-06-06 Thread Paul Gilmartin
On Sat, 6 Jun 2020 15:28:57 -0300, Clark Morris wrote: >On 6 Jun 2020 10:53:44 -0700, (Bob Bridges) wrote: > >>Oh, you need an END-IF even for a single-statement IF? I forgot; I've been >>thinking in REXX too long. In that case you're close; I guess I really meant > But in Rexx similarly, END

Re: COBOL Question

2020-06-06 Thread Clark Morris
[Default] On 6 Jun 2020 10:53:44 -0700, in bit.listserv.ibm-main robhbrid...@gmail.com (Bob Bridges) wrote: >Oh, you need an END-IF even for a single-statement IF? I forgot; I've been >thinking in REXX too long. In that case you're close; I guess I really meant In your example the END-IF is

Re: COBOL Question

2020-06-06 Thread Bob Bridges
Really, a different operator? I didn't know; I bought a C compiler once, a couple decades ago, but then never used it. Now I'm wondering whether VBA has such a distinction and I simply assumed, and never looked for it. I don't think so, but I should remember to look. --- Bob Bridges,

Re: COBOL Question

2020-06-06 Thread Bob Bridges
Oh, you need an END-IF even for a single-statement IF? I forgot; I've been thinking in REXX too long. In that case you're close; I guess I really meant PERFORM 1050-LOOP THRU 1050-EXIT VARYING JC FROM 1 BY 1 TO 99 1050-LOOP. IF X > 999 GOTO 1050-EXIT END-IF. IF FIRST-NAME =

Re: COBOL Question

2020-06-06 Thread Charles Mills
[mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Bob Bridges Sent: Friday, June 5, 2020 11:00 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question Reminds me of a situation I had some years ago while writing a VBA program that used a class (for FTP, I think) that had been written in some

Re: COBOL Question

2020-06-06 Thread Joe Monk
I think what you mean is this: PERFORM 1050-LOOP THRU 1059-EXIT VARYING JC FROM 1 BY 1 UNTIL JC = 99 END-PERFORM 1050-LOOP. IF FIRST-NAME NOT = "ROBERT" GO TO 1059-EXIT END-IF IF TYPE NOT = 195 GO TO 1059-EXIT END-IF IF NOT SO-ON GO TO 1059-EXIT

Re: COBOL Question

2020-06-06 Thread Bob Bridges
Reminds me of a situation I had some years ago while writing a VBA program that used a class (for FTP, I think) that had been written in some flavor of C. I was testing a supposedly Boolean return code and getting unexpected results. I tried several ways, and eventually proved to myself that

Re: COBOL Question

2020-06-05 Thread Bob Bridges
I realize this is a bit of a change in subject (and it's not as if we need yet another one), but I avoid this construction. My phobia is based on an extreme example: In their zeal never to use GOTOs, I've frequently seen programmers write paragraphs like this: PERFORM 1050-LOOP VARYING JC

Re: COBOL Question

2020-06-05 Thread Bernd Oppolzer
This triggered me once more, sorry :-) I recall that we once did a larger project, checking all the PL/1 sources at a customer of mine, looking for errors in program logic, using a tool that I wrote (sort of a light weight, yet powerful, PL/1 parser). The parser threw errors (observations) on

Re: COBOL Question

2020-06-05 Thread Seymour J Metz
816-dmarc-requ...@listserv.ua.edu] Sent: Friday, June 5, 2020 5:26 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question On Fri, 5 Jun 2020 20:54:37 +, Seymour J Metz wrote: >SMOD (IND1) = 'B' OR 'R' means (SMOD (IND1) = 'B') OR (SMOD (IND1) = 'R'); >syntax for implied comparan

Re: COBOL Question

2020-06-05 Thread Farley, Peter x23353
-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question EXTERNAL EMAIL On Fri, 5 Jun 2020 20:17:06 +, Gibney, Dave wrote: >Using OP > IF TVOLL (IND1) NOT = HIGH-VALUE > AND SMOD (IND1) = 'B' OR 'R' > >I would do > IF TVOLL (IND1) NOT = HIGH-VALUE >

Re: COBOL Question

2020-06-05 Thread Paul Gilmartin
On Fri, 5 Jun 2020 20:54:37 +, Seymour J Metz wrote: >SMOD (IND1) = 'B' OR 'R' means (SMOD (IND1) = 'B') OR (SMOD (IND1) = 'R'); >syntax for implied comparands exists in other languages as well. > I have dealt with a language (Mainsail) that had a ternary compare: A <= B < C I don't

Re: COBOL Question

2020-06-05 Thread David Spiegel
Behalf Of Paul Gilmartin Sent: Friday, June 05, 2020 1:33 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question On Fri, 5 Jun 2020 20:17:06 +, Gibney, Dave wrote: Using OP IF TVOLL (IND1) NOT = HIGH-VALUE AND SMOD (IND1) = 'B' OR 'R' I would do IF TVOLL (IND1) N

Re: COBOL Question

2020-06-05 Thread Ken Smith
; Behalf Of Paul Gilmartin > > Sent: Friday, June 05, 2020 1:33 PM > > To: IBM-MAIN@LISTSERV.UA.EDU > > Subject: Re: COBOL Question > > > > On Fri, 5 Jun 2020 20:17:06 +, Gibney, Dave wrote: > > > > >Using OP > > > IF TVOLL (IND1) NO

Re: COBOL Question

2020-06-05 Thread Seymour J Metz
@LISTSERV.UA.EDU] on behalf of Paul Gilmartin [000433f07816-dmarc-requ...@listserv.ua.edu] Sent: Friday, June 5, 2020 4:32 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question On Fri, 5 Jun 2020 20:17:06 +, Gibney, Dave wrote: >Using OP > IF TVOLL (IND1) NOT = HIGH

Re: COBOL Question

2020-06-05 Thread Gibney, Dave
Friday, June 05, 2020 1:33 PM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: COBOL Question > > On Fri, 5 Jun 2020 20:17:06 +, Gibney, Dave wrote: > > >Using OP > > IF TVOLL (IND1) NOT = HIGH-VALUE > > AND SMOD (IND1) = 'B' OR 'R' &g

Re: COBOL Question

2020-06-05 Thread Paul Gilmartin
On Fri, 5 Jun 2020 20:17:06 +, Gibney, Dave wrote: >Using OP > IF TVOLL (IND1) NOT = HIGH-VALUE > AND SMOD (IND1) = 'B' OR 'R' > >I would do > IF TVOLL (IND1) NOT = HIGH-VALUE > IF SMOD (IND1) = 'B' OR 'R' > Do the stuff > I have (almost)

Re: COBOL Question

2020-06-05 Thread Gibney, Dave
t; Behalf Of Paul Gilmartin > Sent: Friday, June 05, 2020 1:12 PM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: COBOL Question > > On Fri, 5 Jun 2020 19:56:06 +, Gibney, Dave wrote: > > >Also, it's often better to nest than to make compound conditions. > > > Do y

Re: COBOL Question

2020-06-05 Thread Steve Beaver
Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Gibney, Dave Sent: Friday, June 5, 2020 2:56 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: COBOL Question Also, it's often better to nest than to make compound conditions. > -Original Message- > From: IBM Mai

  1   2   >