View previous topic :: View next topic
|
Author |
Message |
swapnilushinde
New User
Joined: 17 Mar 2009 Posts: 30 Location: Bangalore.India
|
|
|
|
I want to extract only first record from PS to another one using SORT.
No any key or Index assigned to records. I have sorted the file in descending order and now I want to pick the first one record. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
not being a sort expert, but have bothered to follow many thread on the subject;
sounds as if this could be done in one pass:- sort
- output restricted to 1 record, STOPAFT (however it is spelled) is the control parm that you want.
if you would look in the DFSORT/ICETOOL forum, where this thread should have been,
FRANK has created a Sticky which provides links to reference material (documentation):
ibmmainframes.com/viewtopic.php?t=1348&sid=7d1a98a84684eff3d964c6aa798ab0ba
but then again, you could wait a while and someone will give you the answer,
thus sparing you the pain and discomfort of looking it up yourself.
or asking one of your peers at IBM India
no wonder so many people don't look at the documentation,
even the experts do not!
does your boss know that you advertise your lack of expertise on these forums? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
If you are DFSORT user and have z/OS DFSORT PTF UK90013 (July, 2008) installed, try this:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file
//OUT DD DSN=... output file
//TOOLIN DD *
SUBSET FROM(IN) TO(OUT) INPUT KEEP FIRST
/* |
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Or you may try this as well:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (FB/80)
//SORTOUT DD DSN=... output file (FB/80)
//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,NODETAIL,
HEADER1=(1,80),
/* |
I assume input is of type FB/80. |
|
Back to top |
|
|
swapnilushinde
New User
Joined: 17 Mar 2009 Posts: 30 Location: Bangalore.India
|
|
|
|
dbzTHEdinosauer,
I have solved the same problem using IDCAMS. but i want to shorten the whole code. I wanted to use sort because by this I can club all SORT commands in SYNCTOOL and reduce the lenght of code.
I have tried this with ICETOOL long ago. but to extract the first record is not supporting here.
That's why I asked this thing on FORUM.... There is no any need to inform my Boss.....
Thanks a lot....... |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
I am sure that you can use SYNCSORT and generate two output files in one pass- the complete file in descending order
- a copy of the first record of the first file
I was referring to your displaying the fact that you work for IBM India. IBM India also makes money for consultant work. But who would want to pay for someone of your experience and initiative level? |
|
Back to top |
|
|
swapnilushinde
New User
Joined: 17 Mar 2009 Posts: 30 Location: Bangalore.India
|
|
|
|
dbzTHEdinosauer ,
Just to let you know I am a direct graduate hier and working with IBM INDIA for last 6 months. I am unaware of fact that this forum is for the people who are 'EXPERT' according to your criteria....
'EXPERTISE IS NOT ACHIEVED WITHIN A NIGHT..' Isn't it???
Anyways Thanks for your advice.....
|
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you are missing my point.
this forum is to help others, and giving those with experience a chance to share.
what I was 'sharing' with you is that from a business point of view,
I would not want my customers knowing that they pay good money for
inexperienced help.
I imagine that you are proud to have a job, and have a job with IBM.
I would remove the IBM India from your signature
- this forum is not a place to advertise your association.
That is what I meant
by 'your boss knowing'.
My words have nothing to do with technical expertise.
It has to do with conducting a business. |
|
Back to top |
|
|
swapnilushinde
New User
Joined: 17 Mar 2009 Posts: 30 Location: Bangalore.India
|
|
|
|
ok...ok... I got it... I have removed it from my signature..
Thanks for your suggestion...
Sorry for miss understanding... |
|
Back to top |
|
|
|