Discussion:
LASTPOS
(too old to reply)
Nims,Alva John , Al
2017-02-06 21:17:47 UTC
Permalink
Raw Message
Simple question and it is driving me NUTS! (short drive)

t5="IN:PTR:136.ip-46-105-29.eu."
t7=LASTPOS(":",t5)
Say "t7="t7

Result:
t7=0

I was expecting t7 to be 7. So what am I stupidly doing wrong when using this function.

Al Nims
Systems Admin/Programmer 3
UFIT
University of Florida
(352) 273-1298

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Grinsell, Don
2017-02-06 21:26:03 UTC
Permalink
Raw Message
Good question. I just copied/pasted your rexx into a member of my SYSEXEC library and got t7=7. Did you remember to save before you executed it?

--

Donald Grinsell, Systems Programmer
Enterprise Technology Services Bureau
SITSD/Montana Department of Administration
406.444.2983 (D)

"The only rules that really matter are what a man can do and what man cannot do."
~ Captain Jack Sparrow
-----Original Message-----
Behalf Of Nims,Alva John (Al)
Sent: Monday, February 06, 2017 2:18 PM
Subject: [TSO-REXX] LASTPOS
Simple question and it is driving me NUTS! (short drive)
t5="IN:PTR:136.ip-46-105-29.eu."
t7=LASTPOS(":",t5)
Say "t7="t7
t7=0
I was expecting t7 to be 7. So what am I stupidly doing wrong when using this function.
Al Nims
Systems Admin/Programmer 3
UFIT
University of Florida
(352) 273-1298
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send email to
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Hamilton, Robert
2017-02-06 21:27:07 UTC
Permalink
Raw Message
Works for me.

Turn on tracing with

trace ?i

in front of those statements and look at all the intermediate results.

Here's what I got:

96 *-* t5="IN:PTR:136.ip-46-105-29.eu."
L> "IN:PTR:136.ip-46-105-29.eu."
*-* t7=LASTPOS(":",t5)
L> ":"
V> "IN:PTR:136.ip-46-105-29.eu."
F> "7"
I ran this under REXXTRY, which is why there is only one statement number.

That could also have made a difference. Turn on the tracing and see what it says.

R;


Rob Hamilton
Sr. System Engineer
Chemical Abstracts Service
-----Original Message-----
Behalf Of Nims,Alva John (Al)
Sent: Monday, February 6, 2017 4:18 PM
Subject: LASTPOS
Simple question and it is driving me NUTS! (short drive)
t5="IN:PTR:136.ip-46-105-29.eu."
t7=LASTPOS(":",t5)
Say "t7="t7
t7=0
I was expecting t7 to be 7. So what am I stupidly doing wrong when using this function.
Al Nims
Systems Admin/Programmer 3
UFIT
University of Florida
(352) 273-1298
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send email
Confidentiality Notice: This electronic message transmission, including any attachment(s), may contain confidential, proprietary, or privileged information from Chemical Abstracts Service ("CAS"), a division of the American Chemical Society ("ACS"). If you have received this transmission in error, be advised that any disclosure, copying, distribution, or use of the contents of this information is strictly prohibited. Please destroy all copies of the message and contact the sender immediately by either replying to this message or calling 614-447-3600.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Nims,Alva John , Al
2017-02-06 21:36:10 UTC
Permalink
Raw Message
OOPS!

My bad! I found out what the problem was, the original REXX is dealing with running a USS command from TSOe and processing the output, well where I thought it was a ":", turns out to be "05"x! Translate tables, go figure!

I want to thank everyone for responding, sorry for raising a false alarm (alternate fact?).

Al Nims
Systems Admin/Programmer 3
UFIT
University of Florida
(352) 273-1298

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf Of Hamilton, Robert
Sent: Monday, February 06, 2017 4:27 PM
To: TSO-***@VM.MARIST.EDU
Subject: Re: [TSO-REXX] LASTPOS

Works for me.

Turn on tracing with

trace ?i

in front of those statements and look at all the intermediate results.

Here's what I got:

96 *-* t5="IN:PTR:136.ip-46-105-29.eu."
L> "IN:PTR:136.ip-46-105-29.eu."
*-* t7=LASTPOS(":",t5)
L> ":"
V> "IN:PTR:136.ip-46-105-29.eu."
F> "7"
I ran this under REXXTRY, which is why there is only one statement number.

That could also have made a difference. Turn on the tracing and see what it says.

R;


Rob Hamilton
Sr. System Engineer
Chemical Abstracts Service
-----Original Message-----
Behalf Of Nims,Alva John (Al)
Sent: Monday, February 6, 2017 4:18 PM
Subject: LASTPOS
Simple question and it is driving me NUTS! (short drive)
t5="IN:PTR:136.ip-46-105-29.eu."
t7=LASTPOS(":",t5)
Say "t7="t7
t7=0
I was expecting t7 to be 7. So what am I stupidly doing wrong when using this function.
Al Nims
Systems Admin/Programmer 3
UFIT
University of Florida
(352) 273-1298
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send
Confidentiality Notice: This electronic message transmission, including any attachment(s), may contain confidential, proprietary, or privileged information from Chemical Abstracts Service ("CAS"), a division of the American Chemical Society ("ACS"). If you have received this transmission in error, be advised that any disclosure, copying, distribution, or use of the contents of this information is strictly prohibited. Please destroy all copies of the message and contact the sender immediately by either replying to this message or calling 614-447-3600.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
John McKown
2017-02-06 21:40:23 UTC
Permalink
Raw Message
Post by Nims,Alva John , Al
OOPS!
My bad! I found out what the problem was, the original REXX is dealing
with running a USS command from TSOe and processing the output, well where
I thought it was a ":", turns out to be "05"x! Translate tables, go figure!
​Ah, yes! When you output a non-printable character, such as x'05', under
TSO, the I/O routine translates it to a ":".​
Post by Nims,Alva John , Al
I want to thank everyone for responding, sorry for raising a false alarm (alternate fact?).
Al Nims
Systems Admin/Programmer 3
UFIT
University of Florida
(352) 273-1298
--
Our calculus classes are an integral part of your education.

Maranatha! <><
John McKown

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Paul Gilmartin
2017-02-06 23:55:08 UTC
Permalink
Raw Message
Post by John McKown
Post by Nims,Alva John , Al
My bad! I found out what the problem was, the original REXX is dealing
with running a USS command from TSOe and processing the output, well where
I thought it was a ":", turns out to be "05"x! Translate tables, go figure!
​Ah, yes! When you output a non-printable character, such as x'05', under
TSO, the I/O routine translates it to a ":".​
Really, TSO running from the READY prompt, ought to emit an attribute byte
for a nondisplayable character, same as ISPF EDIT does.

What century is this, anyway?

Or the command separator character.

Or, "▯", in widespread use elsewhere.

But not a commonly used displayable character.

-- gil

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
John McKown
2017-02-06 21:30:28 UTC
Permalink
Raw Message
Post by Nims,Alva John , Al
Simple question and it is driving me NUTS! (short drive)
t5="IN:PTR:136.ip-46-105-29.eu."
t7=LASTPOS(":",t5)
Say "t7="t7
t7=0
I was expecting t7 to be 7. So what am I stupidly doing wrong when using this function.
​I got 7.

3 *-* T5="IN:PTR:136.IP-46-105-29.EU."
Post by Nims,Alva John , Al
L> "IN:PTR:136.IP-46-105-29.EU."
4 *-* T7=LASTPOS(":",T5)
Post by Nims,Alva John , Al
L> ":"
V> "IN:PTR:136.IP-46-105-29.EU."
F> "7"
5 *-* SAY "T7="T7
Post by Nims,Alva John , Al
L> "T7="
V> "7"
O> "T7=7"
T7=7​


​I'd do an ISPF "HEX ON" to be sure that the semi-colons are the same hex
values in both strings.​
Post by Nims,Alva John , Al
Al Nims
Systems Admin/Programmer 3
UFIT
University of Florida
(352) 273-1298
--
Our calculus classes are an integral part of your education.

Maranatha! <><
John McKown

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Loading...