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
 

 

Extract first 2 Qualifiers from the record

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

New User


Joined: 27 Aug 2008
Posts: 8
Location: Chennai

PostPosted: Thu Oct 16, 2008 12:52 pm    Post subject: Extract first 2 Qualifiers from the record
Reply with quote

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
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Oct 16, 2008 12:58 pm    Post subject:
Reply with quote

Is there a question in here, or just a statement of intent ?
Back to top
View user's profile Send private message
harunnisa

New User


Joined: 27 Aug 2008
Posts: 8
Location: Chennai

PostPosted: Thu Oct 16, 2008 1:11 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2239
Location: @my desk

PostPosted: Thu Oct 16, 2008 2:06 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Oct 16, 2008 2:21 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 992
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Oct 16, 2008 2:21 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Oct 16, 2008 2:28 pm    Post subject:
Reply with quote

OR Syncsort Release 1.3
Back to top
View user's profile Send private message
harunnisa

New User


Joined: 27 Aug 2008
Posts: 8
Location: Chennai

PostPosted: Thu Oct 16, 2008 3:30 pm    Post subject:
Reply with quote

Hi,
Thanks so much.I need to do this using DFSORT.can u please help me?
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Oct 16, 2008 3:38 pm    Post subject:
Reply with quote

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
View user's profile Send private message
harunnisa

New User


Joined: 27 Aug 2008
Posts: 8
Location: Chennai

PostPosted: Thu Oct 16, 2008 4:21 pm    Post subject:
Reply with quote

Hi Sambhaji,

ya..it is working fine..thank u very much...
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 Record Not found in AlX but record re... mukun264 COBOL Programming 7 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am


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