View previous topic :: View next topic
|
Author |
Message |
kiran_65
New User
Joined: 01 Apr 2005 Posts: 46
|
|
|
|
Hi,
I have a small query.
If i have 500 records in file(assuming only key). I want to extract information from the master file for all the 500 records usng sort step.
for example the file contains as follows:
956487
548521
879531
--------
-------
The records above will be present in masterfile containing more than one record.
Now my requirement is I have to get all the records in the master file for that record in a file.
IN //SYSIN DD * we will give include condition.
Please let me know if we can give file name in that place.
Please mail me if you didn't understand query.
Thanks
Kiran |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Are you asking if you can select records in one file based on records in another file? Please explain more clearly what you want to do. Show an example of the input records in each file (relevant fields only) and the expected output records. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. |
|
Back to top |
|
|
kiran_65
New User
Joined: 01 Apr 2005 Posts: 46
|
|
|
|
Thanks For reply.
Yes I am asking for selecting records in one file based on records in another file?
I am trying o explain in clear.
for example,
assume that i have a file containg numbers from position 1 to 10. There are 1100 records.
example of file1
1111111111
2222222222
3333333333
----------
---------
-+-----
------
now the second file2 is the master file containing records. The key in file1 is at position 15 to 24.
Now my requirement is I have to get all the records from file2 satisfying criteria of file1.
Using sort we can give the 1100 records in SYSIN DD *, but 1100 records in sysin is too difficult.
So my question is using sort is there any way to et all the 1100 records.
//sysin dd *
1111111111
2222222222
3333333333
---------
---------
--------
------
is the way we can give in SYSIN. But i want to use FILE1 in the sort card. the follwoing way i am asking:
//sysin dd dsn=file1.
Please help me whether it is possible.
Please mail me in the question is not clear.
Bye
Kiran |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Why do you assume that the only way to do it is to put the records in SYSIN? That's NOT the way to do it. You can use either the SELECT or SPLICE operator of DFSORT to do this kind of thing. How you would do it exactly depends on what your records in the two files look like, whether there are duplicates within each file, etc. There are numerous examples on this board of using SELECT and SPLICE to do this kind of thing.
For complete details of SELECT and SPLICE, see:
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/6.0?DT=20060615185603
If you want more specific help, give me the examples and information I asked for. If there can be duplicates within a file, show that in the example. |
|
Back to top |
|
|
|