Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
select high priority records with sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
Author Message
muthukumar

New User


Joined: 24 Mar 2004
Posts: 32

PostPosted: Mon Jul 05, 2004 9:23 pm    Post subject: select high priority records with sort
Reply with quote

Hi all,

i faced the following situation, Please provide solution for this.

I have 3 records with two fields.. name and description.
all the three records has same name where name is the key.but description part is different.

eg
tendulkar
tendulkar He is Brilliant
tendulkar

Out of the three records my sort statement must pick only one and the only one should be that with description.

In case if all the three records didnt have any description than any one of the record can be put in the output...

kindly address this as soon as possible

( please provide solution just with sort.. without using icetool etc...)

regards
Muthu
Back to top
View user's profile Send private message
References
PostPosted: Mon Jul 05, 2004 9:23 pm    Post subject: Re: select high priority records with sort Reply with quote

sandip_datta

EXPERT


Joined: 02 Dec 2003
Posts: 152
Location: Tokyo, Japan

PostPosted: Tue Jul 06, 2004 11:54 am    Post subject:
Reply with quote

I don't know why you don't want to use ICETOOL. If you have DFSORT you must have ICETOOL in your shop.

You don't give us sufficient information. I am assuming the name is of length of 10 and description is of 20 and total length is 80. For simplicity I have used 2 steps.
Code:
//STEP01  EXEC PGM=SORT
//SORTWK01  DD SPACE=(CYL,(10,5)),UNIT=DISK
//SORTWK02  DD SPACE=(CYL,(10,5)),UNIT=DISK
//SYSOUT    DD SYSOUT=*
//SORTIN    DD *
TENDULKAR
TENDULKAR HE IS BRILLIANT
TENDULKAR
/*
//SORTOUT   DD DSN=&&TEMP,
//             UNIT=DISK,
//            DISP=(NEW,PASS,DELETE),
//             SPACE=(CYL,(1,1),RLSE),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
//SYSIN     DD *
  SORT FIELDS=(11,20,CH,D)
/*
//STEP02  EXEC PGM=SORT
//SORTWK01  DD SPACE=(CYL,(10,5)),UNIT=DISK
//SORTWK02  DD SPACE=(CYL,(10,5)),UNIT=DISK
//SYSOUT    DD SYSOUT=*
//SORTIN    DD DSN=&&TEMP,DISP=(OLD,DELETE)
//SORTOUT   DD SYSOUT=*
//SYSIN     DD *
  SORT FIELDS=(1,10,CH,A)
  SUM FIELDS=NONE
/*


Regards,
Sandip.
Back to top
View user's profile Send private message
muthukumar

New User


Joined: 24 Mar 2004
Posts: 32

PostPosted: Tue Jul 06, 2004 3:59 pm    Post subject:
Reply with quote

thanks for your response Sandip...

We dont use ICETOOL in our system.. for some standardisation

You understood my requirement correctly..I too did the same what u have coded. But what i need is to do all this in one single sort step.( Please let me know if its not feasible)

regards
Muthu
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1