Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 2285
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: 998
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Spool Extract for Z /os 1.04 version Khadhar Basha CLIST & REXX 3 Thu Sep 28, 2017 3:14 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us