|
|
| Author |
Message |
Naresh Dasari
New User
Joined: 16 Oct 2007 Posts: 7 Location: Chennai
|
|
|
|
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 |
|
 |
References
|
Posted: Tue Jun 24, 2008 3:36 pm Post subject: Re: Sorting records which starts with 'I' in sorted order |
 |
|
|
 |
Paddy
Active User
Joined: 12 Sep 2005 Posts: 54 Location: Paris France
|
|
|
|
Have you try with icetool ???
Regards.
Paddy |
|
| Back to top |
|
 |
Naresh Dasari
New User
Joined: 16 Oct 2007 Posts: 7 Location: Chennai
|
|
|
|
| No. cant we do without icetool?? |
|
| Back to top |
|
 |
sri_mf
Active User
Joined: 31 Aug 2006 Posts: 198 Location: At my Desk
|
|
|
|
| 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 |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 560
|
|
|
|
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 |
|
 |
Paddy
Active User
Joined: 12 Sep 2005 Posts: 54 Location: Paris France
|
|
|
|
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  |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 3201 Location: Brussels once more ...
|
|
|
|
| Quote: |
| No. cant we do without icetool?? |
But ........ ICETOOL is part of DFSORT |
|
| Back to top |
|
 |
Geetha B
New User
Joined: 24 Nov 2007 Posts: 9 Location: chennai
|
|
|
|
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 |
|
 |
|
|
|