View previous topic :: View next topic
|
Author |
Message |
srini24
New User
Joined: 14 Feb 2017 Posts: 12 Location: India
|
|
|
|
Hi,
I am trying to search for a string from multiple input PS files and if string is found in any datasets, i want that the dataset from the concatenated input datasets to be reflected in the sysout.
I used
Code: |
//SEARCH EXEC PGM=ISRSUPC,
// PARM=(SRCHCMP,
// 'ANYC')
//NEWDD DD DISP=SHR,DSN=INPUT FILE1
// DD DISP=SHR,DSN=INPUT FILE2
// DD DISP=SHR,DSN=INPUT FILE3
// DD DISP=SHR,DSN=INPUT FILE4
// DD DISP=SHR,DSN=INPUT FILE5
//OUTDD DD SYSOUT=(A)
//SYSIN DD *
SRCHFOR 'STRING'
/*
|
While doing so, if the string is found in any of the input files,it is returning code RC 01 but i cannot able to find which input file has the searched string out of other input files.
What i get is,if the searched string is found,its showing the last input file in the sysout but not the exact input file where the searched string is.
I assume all input files are concatenated and taking as whole one input file.
Is there any way to get the exact input file where the searched string is present from the concatenated input file.
Thanks. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
srini24 wrote: |
...
I assume all input files are concatenated and taking as whole one input file.
Is there any way to get the exact input file where the searched string is present from the concatenated input file.
Thanks. |
- I assume all input files are concatenated and taking as whole one input file.
Yes, that is the way sequential input concatenation is supposed to work.
- Is there any way to get the exact input file where the searched string is present from the concatenated input file.
Technically, yes, it can be done, but it is slightly complicated. It must be done in Assembler. The ISPF version of SUPERC appears to be written in PL/S, which is sort of Assembler, but whether the code to extract the concatenation is in the code I cannot say.
|
|
Back to top |
|
|
srini24
New User
Joined: 14 Feb 2017 Posts: 12 Location: India
|
|
|
|
Is there any other way to achieve this on? |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2010 Location: USA
|
|
|
|
srini24 wrote: |
Is there any other way to achieve this on? |
Split your single job step into five sequential steps.
Never try to make things more complicated than they really are.
* * * * *
DD-concatenation has been introduced specifically to make multiple files looking as one single file. There is no simple way to find separate concatenated files except writing your own SUPERC in Assembler.
If you really want to do this, you're welcome. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
steve-myers wrote: |
srini24 wrote: |
...
I assume all input files are concatenated and taking as whole one input file.
Is there any way to get the exact input file where the searched string is present from the concatenated input file.
Thanks. |
- I assume all input files are concatenated and taking as whole one input file.
Yes, that is the way sequential input concatenation is supposed to work.
- Is there any way to get the exact input file where the searched string is present from the concatenated input file.
Technically, yes, it can be done, but it is slightly complicated. It must be done in Assembler. The ISPF version of SUPERC appears to be written in PL/S, which is sort of Assembler, but whether the code to extract the concatenation is in the code I cannot say.
|
I'm sure it is, as searching concatenated PDS'es can not only search multiple same-named members (SDUPM), but also show from which of the concatenated PDS'es the particular member comes:
Code: |
ISRSUPC - MVS/PDF FILE/LINE/WORD/BYTE/SFOR COMPARE UTILITY- ISPF FOR z/OS 2019/04/01 5.34 PAGE 1
MEMBER CONC# LINE-# SOURCE LINE SRCH DSN: PRINO.RAHP.D.PLI
LIFT (01) 820 %filler: proc returns(char); 00820000
LIFT (03) 850 %filler: proc returns(char); 00850000
ISRSUPC - MVS/PDF FILE/LINE/WORD/BYTE/SFOR COMPARE UTILITY- ISPF FOR z/OS 2019/04/01 5.34 PAGE 2
SEARCH-FOR SUMMARY SECTION SRCH DSN: PRINO.RAHP.D.PLI
LINES-FOUND LINES-PROC MEMBERS-W/LNS MEMBERS-WO/LNS COMPARE-COLS LONGEST-LINE
2 33815 2 1 1:72 80
PROCESS OPTIONS USED: LONGLN ANYC SEQ NOPRTCC CKPACKL SDUPM IDPFX
THE FOLLOWING PROCESS STATEMENTS (USING COLUMNS 1:72) WERE PROCESSED:
srchfor '%filler'
SELECT LIFT
THE FOLLOWING "SRH" FILE CONCATENATED DATA SETS WERE SPECIFIED:
(01) PRINO.RAHP.PLI
(02) PRINO.RAHP.CNTL
(03) PRINO.RAHP.D.PLI |
|
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
As Prino said, everything you need is already in the result:
At the end of the report you have:
Code: |
THE FOLLOWING "SRH" FILE CONCATENATED DATA SETS WERE SPECIFIED:
(1) HLQ.SPF.JCL
(2) HLQ.SPF.PROCLIB
(3) HLQ.SPF.CNTL2
(4) HLQ.OPER.JCL |
and the report itself shows the CONCAT#
With IDPFX, the number in parenthesis to the right of the member name:
Code: |
********************************* TOP OF DATA ******
ISRSUPC - MVS/PDF FILE/LINE/WORD/BYTE/SFOR COM
MEMBER CONC# LINE-# SOURCE LINE SRCH DSN:
MEMBER08 (4) 7 //CICSPA EXEC PGM=CPAMAIN
MEMBER27 (2) 7 //CICSPA EXEC PGM=CPAMAIN |
Without IDPFX, the number in parenthesis after the word CONCAT#:
Code: |
MEMBER08 CONCAT#(4) ----------- STRING(S) FOUND -------------------
7 //CICSPA EXEC PGM=CPAMAIN
MEMBER27 CONCAT#(2) ----------- STRING(S) FOUND -------------------
7 //CICSPA EXEC PGM=CPAMAIN |
|
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2010 Location: USA
|
|
|
|
Older versions of SUPERC (still widely used) do not provide detection of concatenated datasets... |
|
Back to top |
|
|
John Del
New User
Joined: 27 Apr 2012 Posts: 42 Location: NY
|
|
|
|
Without knowing what it is that the original poster intends to do with the results list, I would build a personal dataset list and then issue the srchfor command on the command line while in that list. Its manual but it gets the job done fairly easily.
The result will be the messages in which dataset the search term was found. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
sergeyken wrote: |
Older versions of SUPERC (still widely used) do not provide detection of concatenated datasets... |
I don't think so, see the EOS dates on the IBM site.
FWIW, the output I posted predates all the the dates in the IBM document by probably another five years and it's an ADCD. No sane organisation would run such old version of z/OS or ISPF! |
|
Back to top |
|
|
|