IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

can we give a file in control card of sort


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kiran_65

New User


Joined: 01 Apr 2005
Posts: 46

PostPosted: Thu Mar 13, 2008 12:27 am
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Mar 13, 2008 12:46 am
Reply with quote

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
View user's profile Send private message
kiran_65

New User


Joined: 01 Apr 2005
Posts: 46

PostPosted: Tue Mar 18, 2008 11:41 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Mar 19, 2008 1:02 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top