IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Find a string in PS file opened in browse mode using rexx


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mukkas

New User


Joined: 23 Feb 2018
Posts: 1
Location: INDIA

PostPosted: Sat Feb 24, 2018 2:15 pm
Reply with quote

Hi all,

In my project most of the files have data in hexadecimal format.
Whenever we need to search a string in the files, we had to convert the "string to search" to hexa format and doing F x'hexa value' to find the string.

Now I am trying to create a rexx tool, to convert the "search string" to hexa value automatically and find it in the ps file.

I was able fetch the "search string" and convert it into hexa value. However I couldn't use ISREDIT Find command to find the search string. Since ISREDIT can be used only on the files opened in edit mode. Almost all the files in our project are big files. It will be opened in browse mode.

Now the solution I need is "A WAY TO INVOKE FIND COMMAND IN A PS FILE OPENED IN BROWSE MODE". Please suggest. icon_smile.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sat Feb 24, 2018 3:05 pm
Reply with quote

Quote:
In my project most of the files have data in hexadecimal format.

all over the world most part of the data is stored in unprintable format
and for a quick look a hex display is needed

whatever tool you are going to write it will not solve your problem ...

if the string You are looking for is made of <printable> chars no need for an hex search

if the string is made of <unprintable> chars you will have NO way of entering it in <char> mode
and even inside a REXX you will have to hand write it in hex

Quote:

I was able fetch the "search string" and convert it into hexa value.

fetch it from where ?
why not describe thoroughly the requirement and the premises icon_question.gif

anyway - as You already are aware
the ispf way of programmatically dealing with data is called EDIT/VIEW macros
so what You ask for cannot be done, there are no BROWSE macros

and - since Your stance about using BROWSE is strong
there is nothing to do but LOCK the topic because of unreasonable expectations
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Sat Feb 24, 2018 3:23 pm
Reply with quote

Edit macros are not supported for browse.
Have you looked at ISPF SUPERSEARCH? Or SORT?
If you need a more programmable solution, then read the file with REXX EXECIO, 1000 records or so at a time. Or write a proper program.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2545
Location: Silicon Valley

PostPosted: Mon Feb 26, 2018 10:48 pm
Reply with quote

While BROWSE macros are not supported, you may be able to do something, and even as I write this, I am not sure it is a good recommendation.

Use a modified browse panel where you have added rexx code in the )PROC section that gets ZCMD and performs whatever transformation you want done, then sets ZCMD to be whatever FIND command will work for you.

But as Enrico already mentioned, if you cannot type the hex character itself, then how can you simplify the command that you issue?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top