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

Need a Solution


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
anish.ibm

New User


Joined: 28 Jun 2007
Posts: 23
Location: Bangalore

PostPosted: Thu Nov 19, 2009 2:45 pm
Reply with quote

Here is the Input:

Code:

----+----2----+----2----+----3----+--
***************************** Top of
1111111111111111111111100011111111111 -- Header
11111111111111111111   AAA 1111111111
11111111111111111111   AAA 1111111111
11111111111111111111   AAA 1111111111
11111111111111111111   BBB 0123111111
11111111111111111111   BBB 4563111111
11111111111111111111   BBB 7890111111
11111111111111111111   CCC 1111111111
11111111111111111111   CCC 1111111111
2222222222222222222222200022222222222 -- Header
22222222222222222222   AAA 2222222222
22222222222222222222   AAA 2222222222
22222222222222222222   AAA 2222222222
22222222222222222222   BBB 0223222222
22222222222222222222   BBB 4567222222
22222222222222222222   BBB 8902222222
22222222222222222222   CCC 2222222222
22222222222222222222   CCC 2222222222


Output should be

Code:


----+----2----+----2----+----3----+--
***************************** Top of
1111111111111111111111100011111111111 -- Header
11111111111111111111   AAA 1111111111
11111111111111111111   AAA 1111111111
11111111111111111111   AAA 1111111111
11111111111111111111   BBB 0123111111
11111111111111111111   CCC 1111111111
11111111111111111111   CCC 1111111111
2222222222222222222222200022222222222 -- Header
22222222222222222222   AAA 2222222222
22222222222222222222   AAA 2222222222
22222222222222222222   AAA 2222222222
22222222222222222222   BBB 0223222222
22222222222222222222   CCC 2222222222
22222222222222222222   CCC 2222222222



Here the first entry of BBB should be retained and the next 2 entries should be deleted.

Any possibilites through SORT TECH

Thank You
Anish
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Nov 19, 2009 2:52 pm
Reply with quote

Because the solution for sort related questions may vary from product to product, please ensure that you state clearly which sort product you are using.

If you are not sure, then by running a simple sort step shown below, you will be able to find out for yourself.

If the messages start with ICE then your product is DFSORT. Please also post the output of the complete line which has a message code ICE201I, as this will enable our DFSORT experts to determine which release of DFSORT that you have installed. This may also affect the solution offered.

If the messages start with WER or SYT then the product is SYNCSORT and should be posted in the JCL forum. Please also post the information telling which version of SYNCSORT is installed, as this may also affect the solution offered.

Thank you for taking your time to ensure that the valuable time of others is not wasted by offering inappropriate solutions which are not relevant due to the sort product being used and/or the release that is installed in you site.

Code:
//SORTSTEP EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
ABC
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  SORT     FIELDS=COPY


You also need to provide other details than you already have.

What is the DSORG, RECFM & LRECL of both input and output
If there are any keys located in the input file, please specify their length and format
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Nov 19, 2009 9:40 pm
Reply with quote

anish.ibm,

The following DFSORT JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=SORT                                           
//SYSOUT   DD SYSOUT=*                                             
//SORTIN   DD *                                                   
1111111111111111111111100011111111111 -- HEADER                   
11111111111111111111   AAA 1111111111                             
11111111111111111111   AAA 1111111111                             
11111111111111111111   AAA 1111111111                             
11111111111111111111   BBB 0123111111                             
11111111111111111111   BBB 4563111111                             
11111111111111111111   BBB 7890111111                             
11111111111111111111   CCC 1111111111                             
11111111111111111111   CCC 1111111111                             
2222222222222222222222200022222222222 -- HEADER                   
22222222222222222222   AAA 2222222222                             
22222222222222222222   AAA 2222222222                             
22222222222222222222   AAA 2222222222                             
22222222222222222222   BBB 0223222222                             
22222222222222222222   BBB 4567222222                             
22222222222222222222   BBB 8902222222                             
22222222222222222222   CCC 2222222222                             
22222222222222222222   CCC 2222222222                             
//SORTOUT  DD SYSOUT=*                                             
//SYSIN    DD *                                                   
  SORT FIELDS=COPY                                                 
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD,RESTART=(24,3)))
  OUTFIL BUILD=(1,80),OMIT=(24,3,CH,EQ,C'BBB',AND,81,8,ZD,GT,1)   
//*
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 SDSF like solution in EJES (store com... All Other Mainframe Topics 4
No new posts A very ingenious mainframe automation... CA Products 1
No new posts Typing the CENT sign ยข on mainframe,... All Other Mainframe Topics 2
No new posts Any single step solution possible? SYNCSORT 7
This topic is locked: you cannot edit posts or make replies. CICS availability solution CICS 17
Search our Forums:

Back to Top