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

How to get the remaining or other records which are leftout


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Tue Mar 30, 2010 6:10 am
Reply with quote

Hi,
I am using the below jcl to get the first 2 records based on the key.
Code:
//ALP1234 JOB (T,TEST),'KKSULL',MSGCLASS=X,CLASS=B,NOTIFY=&SYSUID     
//*********************************************************************
//S1    EXEC  PGM=ICETOOL                                             
//TOOLMSG DD SYSOUT=*                                                 
//DFSMSG  DD SYSOUT=*                                                 
//IN DD *                                                             
BBI1     BTCENKY   H200    54A91441F1F90942008-02-10-14.37.05.676354   
BBI1     KABG1SVR          691E8590CF3EFF02008-02-10-13.22.42.054753   
BBI1     KABG1SVR  D600    650-FA1109E04902008-02-10-13.22.42.017145   
BBI1     KABG1SVR  DL00    5E0-26B0A3BD3E82008-02-10-13.22.41.961497   
BBI1     KABG1SVR  DE00    688DF-B0E7C00382008-02-10-13.22.41.943247   
BBI1     KFMG1SVR          68AE19B1EC9506C2008-02-10-13.22.42.179674   
BBI1     KFMG1SVR  HE00    68A40CC1-5A27A82008-02-10-13.22.42.158599   
BBI1     KFMG1SVR  D600    6432FAE19A8E3602008-02-10-13.22.42.124639   
BBI1     KFMG1SVR  DL00    5F3AA3F1F5CDD642008-02-10-13.22.42.077827
BBI1     KM025SVR  I900    546F8D81D757DBC2008-02-10-14.37.05.721965
BBI1     KM027SVR  H200    56E63530BB2DEC02008-02-10-14.37.05.770995
BBI1     KM028SVR  H200    56E653C055B3C782008-02-10-14.37.05.790529
BBI1     KM029SVR  H200    56E8A3F-D67DC742008-02-10-14.37.05.842492
BBI1     KTCDBGET  H200    56E635C1CB14F102008-02-10-14.37.06.054400
BBI1     KTCDBGET  G500    5497ACB0BB5AD402008-02-10-14.37.06.004641
//OUT DD SYSOUT=*                                                   
//TOOLIN DD *                                                       
SELECT FROM(IN) TO(OUT) ON(1,17,CH) FIRST(2) 
/*                                                                 

i am getting the below output.
Code:
BBI1     BTCENKY   H200    54A91441F1F90942008-02-10-14.37.05.676354
BBI1     KABG1SVR          691E8590CF3EFF02008-02-10-13.22.42.054753
BBI1     KABG1SVR  D600    650-FA1109E04902008-02-10-13.22.42.017145
BBI1     KFMG1SVR          68AE19B1EC9506C2008-02-10-13.22.42.179674
BBI1     KFMG1SVR  HE00    68A40CC1-5A27A82008-02-10-13.22.42.158599
BBI1     KM025SVR  I900    546F8D81D757DBC2008-02-10-14.37.05.721965
BBI1     KM027SVR  H200    56E63530BB2DEC02008-02-10-14.37.05.770995
BBI1     KM028SVR  H200    56E653C055B3C782008-02-10-14.37.05.790529
BBI1     KM029SVR  H200    56E8A3F-D67DC742008-02-10-14.37.05.842492
BBI1     KTCDBGET  H200    56E635C1CB14F102008-02-10-14.37.06.054400
BBI1     KTCDBGET  G500    5497ACB0BB5AD402008-02-10-14.37.06.004641

I also require the records which are left out separately, below are the leftout records. How to get these ?
Code:
BBI1     KABG1SVR  DL00    5E0-26B0A3BD3E82008-02-10-13.22.41.961497   
BBI1     KABG1SVR  DE00    688DF-B0E7C00382008-02-10-13.22.41.943247   
BBI1     KFMG1SVR  D600    6432FAE19A8E3602008-02-10-13.22.42.124639   
BBI1     KFMG1SVR  DL00    5F3AA3F1F5CDD642008-02-10-13.22.42.077827


Thank You,
Sushanth
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Mar 30, 2010 6:39 am
Reply with quote

Hi,

I'm unable to use FIRST(2) as my DFSORT does not have the latest PTF,

but have you tried adding DISCARD(REST) to your parameter,

and add a DDNAME of //REST DD SYSOUT=*

It's a guess but easily tested.

Gerry
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Tue Mar 30, 2010 7:55 am
Reply with quote

Hi Gerry,

DISCARD(REST) worked.

Thank You Very Much,
Sushanth
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Mar 30, 2010 8:05 am
Reply with quote

Hi,

lucky guess icon_lol.gif


Gerry
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
No new posts JCL sortcard to print only the records DFSORT/ICETOOL 11
Search our Forums:

Back to Top