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
 

 

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: 216
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 Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts JCL to get submitted once dataset has... vinu78 JCL & VSAM 17 Thu Feb 16, 2017 7:32 am
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts CICS NEW SIT PARAMETERS CICS BEHAVIOR... Kyle Carroll CICS 0 Fri Nov 04, 2016 11:55 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm


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