How to find a string in non data lines



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

How to find a string in non data lines

Postby Gilles » Fri Oct 31, 2008 12:55 am

Let's say I have a dataset opened in Edit mode. I've put together a macro that inserts NOTELINES in between the regular DATALINES. Is there a way to perform a FIND command that will search not only the data lines but also those note lines and position the cursor on the 1st occurence of the search string may it be either in the data lines or the note lines ?

From what I can see, FIND only searches the data lines, ignoring all other types of lines (Notes, Messages, Information).

I've tried to "compute" where the cursor should go in an alternative method but even the ISREDIT CURSOR command works only with the data lines. Let's say I have 2 data lines and 3 note lines for a total of 5 lines on display, if I issue a ISREDIT CURSOR = 4 1 command, it does nothing since ISPF sees only two lines, the data ones and won't move the cursor to the 4th line. Is there a way to make ISPF consider all non data lines with the CURSOR command ?

ANy help is appreciated.
Gilles
 
Posts: 16
Joined: Mon Sep 29, 2008 6:10 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to find a string in non data lines

 

Re: How to find a string in non data lines

Postby Bill Dennis » Fri Oct 31, 2008 1:38 am

Rather than generate NOTE lines you could copy in another member containing your text on JCL comment statements.

Note lines can also be made into data lines with the MD line command if you can identify and remove them before saving.
Regards,

Bill Dennis

Disclaimer: My comments on this forum are my own and do not represent the opinions or suggestions of any other person or business entity.
Bill Dennis
 
Posts: 278
Joined: Thu May 15, 2008 9:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to find a string in non data lines

Postby Gilles » Fri Oct 31, 2008 7:28 pm

Hi Bill,

I'm already copying all the lines as data lines in another dataset without the user knowing so I can perform my search in that member. That works just fine but as I said, I can't set the cursor position in the user display cause they're not data lines. And I REALLY don't want the note lines as data lines for the user display since it was like that before and it sometimes happened that those lines were saved and the JCL was ruined. I didn't know about the MD command. If there were the reverse command MN for make note for example, I could maybe take the chance of converting the note lines to data lines, perform the search, set the cursor position and then go back to note lines. But I can't seem to find a command that does that operation.

It was wishful thinking on my part to achieve this but I don't think there is an elegant way to do it. Thanks for your input.
Gilles
 
Posts: 16
Joined: Mon Sep 29, 2008 6:10 pm
Has thanked: 0 time
Been thanked: 0 time


Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post