MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Overiding ISRSUPC UTIL

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
sankar narayanan
Beginner


Joined: 16 Oct 2007
Posts: 29
Topics: 12

PostPosted: Thu Jun 12, 2008 5:11 am    Post subject: Overiding ISRSUPC UTIL Reply with quote

Hi All,

I am having a input file of LRECL=1500.Here i am finding a particular string '12345' by using the PROC ISRSUPC.

Input:
Code:
BROWSE    XXX.USRID.INPUT2                            Line 00000000 Col 001 080
 Command ===>                                                  Scroll ===> CSR 
********************************* Top of Data **********************************
GHJHHGJHJHJ123456                                                               
KLHGHJGHJGJHGJHGJHGJHGJH                                                       
WETTYUYIUOPPPOUOUHJHJ123456WETTYUYIUOPPPOUOUHJHJ123456                         
******************************** Bottom of Data ********************************


Code:
BROWSE    XXX.USRID.INPUT2                            Line 00000000 Col 361 440
 Command ===>                                                  Scroll ===> CSR 
********************************* Top of Data **********************************
                                                                               
12345                                                                           
                                                                               
******************************** Bottom of Data ********************************


Here i am getting the output if the search string('12345') falls within 133
Sample Output:
Code:
000004        1  GHJHHGJHJHJ123456                                           
000005        2  KLHGHJGHJGJHGJHGJHGJHGJH                                     
000006        3  WETTYUYIUOPPPOUOUHJHJ123456WETTYUYIUOPPPOUOUHJHJ123456


But my exceptation on the output i need to get the ouput '12345' which appers in second line @ 361 column.

JCL:
Code:
//SEARCH  EXEC PGM=ISRSUPC,               
//           PARM=(SRCHCMP,' ')           
//NEWDD  DD DSN=XXX.USRID.INPUT2,       
//           DISP=SHR                     
//OUTDD  DD  DSN=XXX.USRID.OUTPUT1,     
//           DISP=(NEW,CATLG,DELETE),     
//           SPACE=(CYL,(20,5),RLSE),     
//          DCB=(*.NEWDD)                 
//SYSIN    DD *                           
SRCHFOR  '12345'                           
/*                                         


Whether my exceptation is Possible....If so help me on these please.
Let me my if you need any additional information.
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Thu Jun 12, 2008 5:41 am    Post subject: Reply with quote

As far as I am aware srchfor searches the entire file no matter what the LRECL - UNLESS YOU RESTRICT IT. I am not sure which option it is that speciifes the columns to be searched but "Help" should give you that.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
sankar narayanan
Beginner


Joined: 16 Oct 2007
Posts: 29
Topics: 12

PostPosted: Thu Jun 12, 2008 5:46 am    Post subject: Reply with quote

Hi

Its finding the entire length.But the i need the output which appears in second line @ 361 column.
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Thu Jun 12, 2008 5:51 am    Post subject: Reply with quote

Then restrict the columns to be searched. CMPCLM or something like that springs to mind. I do not have an ISPF system to enquire on and the manuals are on a CD but my CD drive does not work so you will have to go into SRCHFOR and press the help key and find out for yourself
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
hari_uss
Beginner


Joined: 19 Dec 2002
Posts: 78
Topics: 6
Location: Trivandrum, India

PostPosted: Thu Jun 12, 2008 5:44 pm    Post subject: Reply with quote

Probably you are looking for LSTCOLM 361:365?

See complete list of SuperCE options at
http://publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.f54u200/sceuo.htm
Back to top
View user's profile Send private message Send e-mail
sankar narayanan
Beginner


Joined: 16 Oct 2007
Posts: 29
Topics: 12

PostPosted: Fri Jun 13, 2008 1:26 am    Post subject: Reply with quote

Hi

Actullay i am aware on LSTCOLM.But it never helps me on the excepted output.

Code:
********************************* Top of Data **********************************
  ISRSUPC   -   MVS/PDF FILE/LINE/WORD/BYTE/SFOR COMPARE UTILITY- ISPF FOR z/OS
 LINE-#  SOURCE SECTION                    SRCH DSN: XXXX.USRID.INPUT2       
                                                                               
      1  GHJHHGJHJHJ123456                                                     
      2  KLHGHJGHJGJHGJHGJHGJHGJH                                               
      3  WETTYUYIUOPPPOUOUHJHJ123456WETTYUYIUOPPPOUOUHJHJ123456                 
                                                                               
  ISRSUPC   -   MVS/PDF FILE/LINE/WORD/BYTE/SFOR COMPARE UTILITY- ISPF FOR z/OS
     SEARCH-FOR SUMMARY SECTION            SRCH DSN: XXXX.USRID.INPUT2       
                                                                               
LINES-FOUND  LINES-PROC  DATASET-W/LNS  DATASET-WO/LNS  COMPARE-COLS  LONGEST-LI
        3            3            1              0           1:1017       1017 
                                                                               
                                                                               
THE FOLLOWING PROCESS STATEMENTS (USING COLUMNS 1:72) WERE PROCESSED:           
   SRCHFORC '1234'                                                             
ISRS038W SRCHFORC MUST BE PRECEDED BY A VALID SRCHFOR/SRCHFORC STATEMENT.  STATE
   SRCHFOR  '12345'                                                             
                                                                               
ISRS004I LISTING LINES MAY BE TRUNCATED DUE TO LIMITING OUTPUT LINE WIDTH.                                                   
                                                                               
******************************** Bottom of Data ********************************


If you look into the above scr shot the search string is identified in the 2 line @ column 361 of the input dsn.

But i want the identified search string in the terminal (i.e.Output of superce should display '12345' @ 2 line as its display the search string '12345' @ line1&3)

Please find my excepted sample O/P:
Code:
********************************* Top of Data **********************************
  ISRSUPC   -   MVS/PDF FILE/LINE/WORD/BYTE/SFOR COMPARE UTILITY- ISPF FOR z/OS
 LINE-#  SOURCE SECTION                    SRCH DSN: XXXX.USRID.INPUT2       
                                                                               
      1  GHJHHGJHJHJ123456                                                     
      2  KLHGHJGHJGJHGJHGJHGJHGJH                                               
      3  WETTYUYIUOPPPOUOUHJHJ123456WETTYUYIUOPPPOUOUHJHJ123456                                                                                               

******************************************************************


Code:
********************************* Top of Data *********************************
    ISRSUPC   -   MVS/PDF FILE/LINE/WORD/BYTE/SFOR COMPARE UTILITY- ISPF FOR z/OS
 LINE-#  SOURCE SECTION                    SRCH DSN: XXXX.USRID.INPUT2

                                                                             
                    12345                                                     
                                                                               
******************************** Bottom of Data *******************************


Hope now i am clear with the requirement.
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Fri Jun 13, 2008 2:09 am    Post subject: Reply with quote

No - you are not clear!!

Ah - but I think I understand what you are saying. Although search finds the line it only prints the first 72 columns. Nothing you can do about that because even using LONGLN it prints thenfirst 176 bytes only. No way around that using searchfor/superc - the output is designed for printng and printers have a limited width.

You could use DFSORT to search the record for your string (SS comes to mind) and output the rcord to a file if found. r you could write a little Rexx program to do a similar thing using INDEX or POS to find the string.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
sankar narayanan
Beginner


Joined: 16 Oct 2007
Posts: 29
Topics: 12

PostPosted: Sun Jun 15, 2008 11:40 pm    Post subject: Reply with quote

Hi Nic Clouston

If so can you please give me the JCL and REXX code on the same.
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Mon Jun 16, 2008 3:28 am    Post subject: Reply with quote

Have you got a Rexx manual?

No, I do not have a rexx program to hand. But it is very simple:

read the file (use EXECIO to read one record at a time)
do while rc = 0 (I think 400 is eof from EXECIO)
for each line use the POS or index function to find out if the string exists
if it does the write the line out to another file (ue EXECIO again)
read next record
end do
Exit


If your file is small you can read it in one go (use * with EXECIO) into a stem variable. stem.0 will be populated by EXECIO with the record count so your do loop becomes:

do i = 1 to stem.0

and you use POS or INDEX against stem.i

JCL is in the relevant manual and I am sure there are several examples on the board - seacrh for IKJEFT01 or even IKJEFT as there are different versions depending on the type of program being executed in batch.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group