Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

can we give a file in control card of sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: can we give a file in control card of sort
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 Moderator


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

PostPosted: Thu Mar 13, 2008 12:46 am    Post subject:
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    Post subject: Reply to: can we give a file in control card of sort
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 Moderator


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

PostPosted: Wed Mar 19, 2008 1:02 am    Post subject:
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:

http://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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us