Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Sorting records which starts with 'I' in sorted order

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Naresh Dasari

New User


Joined: 16 Oct 2007
Posts: 9
Location: Chennai

PostPosted: Tue Jun 24, 2008 3:36 pm    Post subject: Sorting records which starts with 'I' in sorted order
Reply with quote

Hi,
I have some records in the format I000100,M000120,I000110,M000100,I000150,I000130,I000140
I want to write all the records which starts with 'I' in sorted order into another file. But in the new sorted file i dont want the letter 'I'.
How to write sort card in jcl.

Thnks
Naresh
Back to top
View user's profile Send private message

Paddy

New User


Joined: 12 Sep 2005
Posts: 46
Location: Paris France

PostPosted: Tue Jun 24, 2008 3:49 pm    Post subject:
Reply with quote

Have you try with icetool ???

Regards.
Paddy
Back to top
View user's profile Send private message
Naresh Dasari

New User


Joined: 16 Oct 2007
Posts: 9
Location: Chennai

PostPosted: Tue Jun 24, 2008 3:53 pm    Post subject: Reply to: sorting records
Reply with quote

No. cant we do without icetool??
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 216
Location: India

PostPosted: Tue Jun 24, 2008 3:57 pm    Post subject: Re: sorting records
Reply with quote

Naresh Dasari wrote:
Hi,
I have some records in the format I000100,M000120,I000110,M000100,I000150,I000130,I000140
I want to write all the records which starts with 'I' in sorted order into another file. But in the new sorted file i dont want the letter 'I'.
How to write sort card in jcl.

Thnks
Naresh


whats is your SortKey.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Tue Jun 24, 2008 4:05 pm    Post subject:
Reply with quote

Hi Naresh,

are you saying each record has 7 fields separated by a comma ?

each field is 7 bytes long ?

What's the output going to look like ?


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

New User


Joined: 12 Sep 2005
Posts: 46
Location: Paris France

PostPosted: Tue Jun 24, 2008 6:46 pm    Post subject:
Reply with quote

Hi again Naresh,

what's kind of sort tools are available to your shop ??? i think that you can't answer about your problem with only JCL., You'll need REXX or SORT tool if you want to create a new file or member.


Regards

Paddy icon_question.gif
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: Tue Jun 24, 2008 6:48 pm    Post subject:
Reply with quote

Quote:
No. cant we do without icetool??

But ........ ICETOOL is part of DFSORT
Back to top
View user's profile Send private message
Geetha B

New User


Joined: 24 Nov 2007
Posts: 12
Location: chennai

PostPosted: Wed Jun 25, 2008 2:47 pm    Post subject: Reply to: Sorting records which starts with 'I' in sorted or
Reply with quote

Check if the below code satisfies ur req


Code:
//STEP01   EXEC PGM=SORT,COND=(1,LT,SETCOND)                     
//SYSOUT   DD SYSOUT=*                                           
//SORTIN   DD *                                                   
I000100,M000120,I000110,M000100,I000150,I000130,I000140           
//SORTOUT  DD DISP=(NEW,PASS),DSN=&TEMP                           
//SYSIN    DD *                                                   
  SORT FIELDS=COPY                                               
  OUTFIL FILES=OUT,                                               
  OUTREC=(1,7,/,                                                 
         9,7,/,                                                   
         17,7,/,                                                 
         25,7,/,                                                 
         33,7,/,                                                 
         41,7,/,                                                 
         49,7)                                                   
/*                                                                     
//STEP01   EXEC PGM=SORT,COND=(2,LT,SETCOND)                           
//SYSOUT   DD SYSOUT=*                                                 
//SORTIN   DD DISP=(OLD,DELETE),DSN=&TEMP                               
//SORTOUT  DD SYSOUT=*                                                 
//SYSIN    DD *                                                         
 SORT FIELDS=(2,6,CH,A)                                                 
 INCLUDE COND=(1,1,CH,EQ,C'I')                                         
 OUTREC FIELDS=(2,6)                                                   
/*                                                                     


Output

000100
000110
000130
000140
000150
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Order BY AND Index Nileshkul DB2 2 Sat Dec 31, 2016 6:33 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Efficient sorting chandracdac DFSORT/ICETOOL 5 Sat Oct 22, 2016 3:23 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us