Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Need a Solution

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Need a Solution
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: 8593
Location: Back in jolly old England

PostPosted: Thu Nov 19, 2009 2:52 pm    Post subject:
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    Post subject: Reply to: Need a Solution
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Need help in design the solution ritnihi PL/I & Assembler 1 Tue Dec 22, 2015 1:48 pm
No new posts Please give me solution(OUTPUT ) for ... sivareddy123 COBOL Programming 4 Mon Feb 02, 2015 1:33 pm
No new posts Delimited File -Unable to Find solution Dimpy Udhani JCL & VSAM 7 Mon Nov 24, 2014 11:40 am
No new posts MQ Solution Designer Certification Appu IBM Tools 0 Mon Jul 07, 2014 11:25 am
No new posts ICETOOL/Joinkeys Solution for Group B... ksouren007 DFSORT/ICETOOL 3 Wed Mar 05, 2014 4:04 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us