Hex'25'

41 views
Skip to first unread message

Frank Clarke

unread,
Mar 27, 2021, 1:09:49 PM3/27/21
to ISPF-List
I'm trying to parse (via an edit macro) text that contains random x'25' characters, generally where a line once ended.  They're clearly visible in ISPF Edit and are easily pinpointed by "F x'25' ".

My edit macro can't see them.  When I package a group of lines by concatenating them together, neither INDEX nor POS nor PARSE can locate them.  The last test I made was to interrogate the line as the edit macro first picks it up.   They're not there.
        x25 = x'25'
        "(text) = LINE" 1
        say Index(text,x25)  
results in "0".  Exactly the same as   "say Pos(x25,text)"

Is x'25' somehow 'special' as regards edit macros?

Paul Gilmartin

unread,
Mar 27, 2021, 1:21:48 PM3/27/21
to ISPF-List
Most UNIX systems separate lines with LF (EBCDIC x'25'). z/OS,
irritatingly uses NL (EBCDIC x'15). iconv on LINUX translates:
LF <-> LF
NL <-> NL
iconv on z/OS translates:
LF <-> NL

How did hou get in this mess? Can you use "tr" to "fix" it?
Does "extattr -F LF" fix it?

Are you viewing the file with ISPF 3.17?

-- gil

Frank Clarke

unread,
Mar 27, 2021, 2:15:17 PM3/27/21
to ISPF-List
The main ISPF panel says "ISPF 7.4".  The code in question originated on a m/f and was FTP'd to a PC for archival and transport, and has now been brought back to a different m/f.  When it arrived (via IND$FILE) it was assigned to a VB255 PO-E dataset.  Some routines arrived in good condition, each line occupying its own line.  Some routines (like this one) arrived in what looks like one undifferentiated (save for the x'25' line breaks) string, so getting it back in proper order means 
  • text-split at each x'25', one by one
  • bulk-excise all leftover unprintables
For a routine that originally had 600+ lines, that's 600+ text-split operations.  Thus, a macro that
  • concatenates the entire magilla into one giant string
  • parse text ahead of the next x'25'
  • write the cleaned-up line
  • shorten the magilla as by SUBSTR or PARSE 
  • repeat until no more magilla
But... if the macro can't see the next x'25'...

I could, of course, convert them all to x'ef' ahead of the macro, but I don't know that that would constitute 'a solution'.





--
You received this message because you are subscribed to the Google Groups "ISPF discussion list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ispf-l-list+unsub...@nd.edu.

To view this discussion on the web visit https://groups.google.com/a/nd.edu/d/msgid/ispf-l-list/0F008DA3-0AE5-406B-9F73-DDEADAC2FDE3%40GMail.com.

Paul Gilmartin

unread,
Mar 27, 2021, 2:34:20 PM3/27/21
to ISPF-List
On 2021-03-27, at 12:15:12, 'Frank Clarke' wrote:
>
> The main ISPF panel says "ISPF 7.4".
>
I meant panel 3.17; you took it to mean ISPF version.

> The code in question originated on a m/f and was FTP'd to a PC for archival and transport, and has now been brought back to a different m/f. When it arrived (via IND$FILE) it was assigned to a VB255 PO-E dataset. Some routines arrived in good condition, each line occupying its own line. Some routines (like this one) arrived in what looks like one undifferentiated (save for the x'25' line breaks) string,
>
Can you inspect the files on the PC with a low-level (e.g. hex) viewer?
Is there a visible difference between the two classes of files?

If it were available to me, I'd use FTP desktop client for both
transfers with commands:
BINARY
QUOTE SITE TYPE E
QUOTE SITE MODE B
GET or PUT

Frank Clarke

unread,
Mar 27, 2021, 2:34:56 PM3/27/21
to ISPF-List
Duh.....

Setting  " x25  = x'25' "  doesn't work.
Setting  " x25  = '25'x "  does.

Sorry for the fuss.  Sometimes I just need to find an available ear.




To unsubscribe from this group and stop receiving emails from it, send an email to ispf-l-list...@nd.edu.
To view this discussion on the web visit https://groups.google.com/a/nd.edu/d/msgid/ispf-l-list/1430986228.568136.1616868913002%40mail.yahoo.com.

Bob Bridges

unread,
Mar 27, 2021, 3:18:34 PM3/27/21
to ispf-...@nd.edu

Interesting!  I read only a week or three ago, with mild surprise, that in REXX/TSO the ‘x’ must follow the value.  I’m so used to it being on either side, in other languages, that I’d always assumed it was the same in REXX.  And despite my surprise at reading that, I managed to forget it afterward, until just now.

 

---

Bob Bridges, robhb...@gmail.com, cell 336 382-7313

 

/* When I face an issue of great import that cleaves both constituents and colleagues, I always take the same approach. I engage in deep deliberation and quiet contemplation. I wait to the last available minute and then I always vote with the losers. Because, my friend, the winners never remember and the losers never forget.  -Sen. Everett Dirksen */

 

From: 'Frank Clarke' via ISPF discussion list <ispf-...@nd.edu>
Sent: Saturday, March 27, 2021 14:35

 

Duh.....

Setting  " x25  = x'25' "  doesn't work.

Setting  " x25  = '25'x "  does.

 

Sorry for the fuss.  Sometimes I just need to find an available ear.

 

Dave Salt

unread,
Mar 27, 2021, 5:20:59 PM3/27/21
to ispf-...@nd.edu
You've found the answer so I know this suggestion comes too late, but given you're using an edit macro another option would have been to simply use the ISPF Edit FIND command to find the characters you're looking for.

Dave Salt

SimpList - try it; you'll get it!

From: ispf-...@nd.edu <ispf-...@nd.edu> on behalf of Bob Bridges <robhb...@gmail.com>
Sent: March 27, 2021 3:18 PM
To: ispf-...@nd.edu <ispf-...@nd.edu>
Subject: RE: [ISPF-L] Hex'25'
 
--
You received this message because you are subscribed to the Google Groups "ISPF discussion list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ispf-l-list...@nd.edu.
Reply all
Reply to author
Forward
0 new messages