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
 
INCLUDE COND parameters from a dataset.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
jithumohan

New User


Joined: 31 Jan 2008
Posts: 30
Location: Woodland Hills, CA

PostPosted: Tue Apr 15, 2008 11:23 am    Post subject: INCLUDE COND parameters from a dataset.
Reply with quote

Hi,

Can we get the include condition parameters ('1234567') from a dataset?

SORT FIELDS=COPY
INCLUDE COND=(1,6,CH,EQ,C'1234567')

In the above example I have the data '1234567' in a dataset and I need to extract records from another dataset based on this parameter (Which is in first dataset).

In my case the first dataset have 1 lakh records. I need to automate this using a sort. Can we do this using SORT/ICETOOL or any other utility.
Back to top
View user's profile Send private message

sri_mf

Active User


Joined: 31 Aug 2006
Posts: 215
Location: India

PostPosted: Tue Apr 15, 2008 12:32 pm    Post subject: Re: INCLUDE COND parameters from a dataset.
Reply with quote

can you post a few records of input and expected output
Back to top
View user's profile Send private message
jithumohan

New User


Joined: 31 Jan 2008
Posts: 30
Location: Woodland Hills, CA

PostPosted: Tue Apr 15, 2008 12:48 pm    Post subject:
Reply with quote

Thanks for the response

First file(key file): LRECL = 12
YYYYYCCCCCCC
CCCC1234567
OOOOCCCCCCC

Second file (input file): (Matching record 9:12)
RRRR1234OOOOCCCCCCC
RYYR1234OOOyy999999
BBBB1234YYYYYCCCCCCC
UUUU1234CCCC1234567
RRRR1234OOOO9kk9999
RRRR1234OOOOCCCCCCC
BBBB1234CCCC1234567
UUUU1234YYYYYCCCCCC
RRRR1234OOOO9999999
88888888OOOOCCCCCCC

Output file records should be as follows.

RRRR1234OOOOCCCCCCC
BBBB1234YYYYYCCCCCCC
UUUU1234CCCC1234567
RRRR1234OOOOCCCCCCC
BBBB1234CCCC1234567
UUUU1234YYYYYCCCCCC

Could you please let me know if you have any doubts.
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: Tue Apr 15, 2008 12:57 pm    Post subject:
Reply with quote

Take a look at the ICETOOL SELECT parameter, although you may have to reformat the records of one file to ensure that the two keys have a matching location.

I do have an example somewhere, and will try to find it later if I get time, although there are many examples in the forum already.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Apr 15, 2008 9:33 pm    Post subject:
Reply with quote

Jithu,

Here's a DFSORT/ICETOOL job that will do what you asked for using SPLICE:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN1 DD DSN=...  input file1 (FB/12)
//IN2 DD DSN=...  input file2 (FB/20)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//T2 DD DSN=&&T2,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT DD DSN=...  output file (FB/20)
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(T2) ON(9,12,CH) -
  WITHALL WITH(1,29) USING(CTL3)
SORT FROM(T2) TO(OUT) USING(CTL4)
/*
//CTL1CNTL DD *
  INREC BUILD=(9:1,12,29:C'BB')
/*
//CTL2CNTL DD *
  INREC OVERLAY=(21:SEQNUM,8,ZD,29:C'VV')
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=T2,INCLUDE=(29,2,CH,EQ,C'VB'),
    BUILD=(1,28)
/*
//CTL4CNTL DD *
  SORT FIELDS=(21,8,ZD,A)
  OUTREC BUILD=(1,20)
/*
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Apr 15, 2008 9:35 pm    Post subject:
Reply with quote

Quote:
Take a look at the ICETOOL SELECT parameter


SELECT won't work here because there are duplicate records in file2. SPLICE is required for that.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts More than 1 Include criteria for sing... Roy Ware SYNCSORT 6 Wed Sep 13, 2017 11:45 pm
This topic is locked: you cannot edit posts or make replies. Selecting two copybooks of different ... Vignesh Sid COBOL Programming 8 Tue Sep 05, 2017 7:28 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm

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