View previous topic :: View next topic
|
Author |
Message |
soumyabiswas
New User
Joined: 05 Nov 2020 Posts: 2 Location: India
|
|
|
|
Hi - I am using sort utility to search one record in a set of 10 files. Only one file will contain the expected data. when i am giving all the 10 input at sortin, i m getting result in sortout file. But i need to know which file out of 10 files contains the actual data..is there any way to get that apart from running sort with individual file?
Thanks in advance.
Soumya |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
Write a Program. Thru Rexx you can get the name of the Data Set allocated on each DD and then do a look up and if found then write DSN name and record in out.
Second option , if you have a unique header then copy that in output and link back later to DSN.
Third, Check CBTtapes website if they offer anything. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2010 Location: USA
|
|
|
|
This question has nothing to do neither with JCL, nor with VSAM.
AFAIR the SuperSearch utility can recognize, and log the number of DD in concatenation where the string has been found.
This problem is so trivial, I’m just lazy to run the test, or to re-check the manuals. Please do it (at least this only) by yourself. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
run 10 steps |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 712 Location: Denmark
|
|
|
|
Sorry I did not read your entry thoroughly.
Actually doing 10 separate sorts is not such a big deal, you can do it as an in-stream procedure like shown below, especially since you have your sort step already:
//A PROC IDS=
//S EXEC SORT
//SORTIN DD DISP=SHR,DSN=&IDS
..rest of SORT JCL ..
// PEND
//*
//S1 EXEC A,IDS=1st.dataset
I seem to recall that you can have instream data in a procedure now, but if not then put the sort sysin in a dataset.
If this is something which is to run regularly then SuperSearch as sergeyken suggests is probably the way to go. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2010 Location: USA
|
|
|
|
FYI:
Unlike DFSORT, the SYNCSORT utility can support the option MULTIIN. It would allow you to get the number of the input file when the string is found. |
|
Back to top |
|
|
soumyabiswas
New User
Joined: 05 Nov 2020 Posts: 2 Location: India
|
|
|
|
Thanks all for your help. |
|
Back to top |
|
|
|