View previous topic :: View next topic
|
Author |
Message |
harunnisa
New User
Joined: 27 Aug 2008 Posts: 8 Location: Chennai
|
|
|
|
i want to extract first 2 Qualifiers from the record
The input is:
SYS3.AACICS.CO.SKFXAUTH M4NYTC PO U 0 184
CATALOG.VCATTTT
SYS3.AACICS.CO.SKFXCLIB M4NYTC PO U 0 184
CATALOG.VCATTTT
SYS3.AACICS.CO.SKFXDSCT M4NYTC PO FB 80 279
CATALOG.VCATTTT
SYS3.AACICS.CO.SKFXLOAD M4NYTC PO U 0 184
CATALOG.VCATTTT
SYS3.AAVIEW.CN.SKAZAUTH M4NYTC PO U 0 327
CATALOG.VCATTTT
the output should be:
SYS3.AACICS
SYS3.AAVIEW |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Is there a question in here, or just a statement of intent ? |
|
Back to top |
|
|
harunnisa
New User
Joined: 27 Aug 2008 Posts: 8 Location: Chennai
|
|
|
|
Hi,
My infile is containg records as follows.
SYS3.AACICS.CO.SKFXAUTH M4NYTC PO U 0 184
CATALOG.VCATTTT
SYS3.AACICS.CO.SKFXCLIB M4NYTC PO U 0 184
CATALOG.VCATTTT
SYS3.AACICS.CO.SKFXDSCT M4NYTC PO FB 80 279
CATALOG.VCATTTT
SYS3.AACICS.CO.SKFXLOAD M4NYTC PO U 0 184
CATALOG.VCATTTT
SYS3.AAVIEW.CN.SKAZAUTH M4NYTC PO U 0 327
CATALOG.VCATTTT
SYS3.ABENDAID.CN.SKAZAUTH M4NYTC PO U 0 327
CATALOG.VCATTTT
I need to get my outfile should be as follows without duplicates.
SYS3.AACICS
SYS3.AAVIEW
SYS3.ABENDAID
Could you please help me to get the result by using SORT- JCL?
Thanks. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Quote: |
Could you please help me to get the result by using SORT- JCL? |
Yes. But you need to answer a few questions. Are all your HLQs = "SYS3" or do you expect other qualifiers also? If YES, Are they of the same length? |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
I assume first part is DSN names so each qualifier can have max length of 8
Code: |
//TOOLIN DD *
COPY FROM(IN) TO(OUT) USING(CTL1)
/*
//CTL1CNTL DD *
SORT FIELDS=(1,9,CH,A,10,8,CH,A)
SUM FIELDS=NONE
OMIT COND=(1,15,CH,EQ,C'CATALOG.VCATTTT')
INREC PARSE=(%00=(FIXLEN=8,ENDBEFR=C'.'),
%01=(FIXLEN=8,ENDBEFR=C'.')),
BUILD=(%00,C'.',%01)
OUTREC FIELDS=(1,17,SQZ=(SHIFT=LEFT))
/*
|
Output
Code: |
SYS3.AACICS
SYS3.AAVIEW
SYS3.ABENDAID
|
|
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Quote: |
Yes. But you need to answer a few questions. |
Yes, and specify whether using SYNCSORT or DFSORT. DFSORT's PARSE function would be very useful for this, I feel.
Garry. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
OR Syncsort Release 1.3 |
|
Back to top |
|
|
harunnisa
New User
Joined: 27 Aug 2008 Posts: 8 Location: Chennai
|
|
|
|
Hi,
Thanks so much.I need to do this using DFSORT.can u please help me? |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
harunnisa
wrote: |
Thanks so much.I need to do this using DFSORT.can u please help me? |
Have you taken effort copying above to your shop and run it? |
|
Back to top |
|
|
harunnisa
New User
Joined: 27 Aug 2008 Posts: 8 Location: Chennai
|
|
|
|
Hi Sambhaji,
ya..it is working fine..thank u very much... |
|
Back to top |
|
|
|