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

Sorting records which starts with 'I' in sorted order


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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
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: 218
Location: India

PostPosted: Tue Jun 24, 2008 3:57 pm
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: 1702
Location: Australia

PostPosted: Tue Jun 24, 2008 4:05 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Tue Jun 24, 2008 6:48 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
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 Rotate partition-logical & physic... DB2 0
Search our Forums:

Back to Top