View previous topic :: View next topic |
Author |
Message |
sankar narayanan Beginner
Joined: 16 Oct 2007 Posts: 29 Topics: 12
|
Posted: Thu Jun 12, 2008 5:11 am Post subject: Overiding ISRSUPC UTIL |
|
|
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 |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Thu Jun 12, 2008 5:41 am Post subject: |
|
|
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 |
|
|
sankar narayanan Beginner
Joined: 16 Oct 2007 Posts: 29 Topics: 12
|
Posted: Thu Jun 12, 2008 5:46 am Post subject: |
|
|
Hi
Its finding the entire length.But the i need the output which appears in second line @ 361 column. |
|
Back to top |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Thu Jun 12, 2008 5:51 am Post subject: |
|
|
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 |
|
|
hari_uss Beginner
Joined: 19 Dec 2002 Posts: 78 Topics: 6 Location: Trivandrum, India
|
|
Back to top |
|
|
sankar narayanan Beginner
Joined: 16 Oct 2007 Posts: 29 Topics: 12
|
Posted: Fri Jun 13, 2008 1:26 am Post subject: |
|
|
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 |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Fri Jun 13, 2008 2:09 am Post subject: |
|
|
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 |
|
|
sankar narayanan Beginner
Joined: 16 Oct 2007 Posts: 29 Topics: 12
|
Posted: Sun Jun 15, 2008 11:40 pm Post subject: |
|
|
Hi Nic Clouston
If so can you please give me the JCL and REXX code on the same. |
|
Back to top |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Mon Jun 16, 2008 3:28 am Post subject: |
|
|
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 |
|
|
|
|