MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ICETOOL - TO DROP MATCHING

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
sushma4satya
Beginner


Joined: 04 Nov 2005
Posts: 14
Topics: 4

PostPosted: Thu Dec 08, 2005 10:31 am    Post subject: ICETOOL - TO DROP MATCHING Reply with quote

With reference to the previous posts to drop the matching field I used
the following JCL.
Code:

//R010  EXEC  PGM=ICETOOL                                       
//INPUT1  DD  DSN=TESTMRN.MR0263.MR263.MRDVAFR.G1231SOR,DISP=SHR
//INPUT2  DD  DSN=TESTMRN.MR0243.MR243.MRDVAFR.G1235SOR,DISP=SHR
//TOOLMSG  DD SYSOUT=*                                           
//DFSMSG   DD SYSOUT=*                                           
//CTL2CNTL DD DSN=&&TEMP1,DISP=(,PASS)                           
//OUTPUT   DD DSN=TESTMRN.MR0263.MR263.MRDVAFR.G1231,           
//            DISP=(NEW,CATLG,DELETE),                           
//            UNIT=SYSDA,                                       
//            BLKSIZE=0,                                         
//            DSORG=PS,                                         
//            LRECL=150,                                         
//            RECFM=FB                                           
//TOOLIN   DD *                                                 
  COPY FROM(INPUT1)  TO(CTL2CNTL) USING(CTL1)                   
  COPY FROM(INPUT2)  TO(OUTPUT)   USING(CTL2)                   
/*                                                               
//CTL1CNTL DD *                                                 
  OUTFIL FNAMES=CTL2CNTL,REMOVECC,                               
  OUTREC=(C'               49,11,CH,NE,C''',49,11,C''',AND,',150:X), ,
  HEADER1=(' INCLUDE COND=(49,11,CH,NE,C''',49,11,''',AND,',150:X), ,
  TRAILER1=('              49,11,CH,NE,C''',49,11,''')',150:X)       
/*                                                                   


As the number of input records are more than 11,000.
I am getting below error
COPY FROM(INPUT2) TO(OUTPUT) USING(CTL2)
DFSORT CALL 0002 FOR COPY FROM INPUT2 TO OUTPUT USING CTL2CNTL TERMINATED
OPERATION RETURN CODE: 16

Please let me know is there any alternative method.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Dec 08, 2005 10:35 am    Post subject: Reply with quote

sushma4satya,

Post your complete TOOLMSG and DFSMSG messages here. Also if you put the requirements clearly may be we can suggest an alternative solution.
Code:

1.LRECL and RECFM of both the files
2.Matching Keys and their format
3.Does any files have dups?
4.Sample input and desired output



Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Thu Dec 08, 2005 10:37 am    Post subject: Reply with quote

Aren't the DFSORT control datasets supposed to have an LRECL of 80? Your code is setting the LRECL of CTL2CNTL to 150.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Dec 08, 2005 10:44 am    Post subject: Reply with quote

Quote:

Aren't the DFSORT control datasets supposed to have an LRECL of 80? Your code is setting the LRECL of CTL2CNTL to 150.


Superk,

Not really . If the LRECL is greater than 80, DFSORT will use the first 80 bytes of each record.

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sushma4satya
Beginner


Joined: 04 Nov 2005
Posts: 14
Topics: 4

PostPosted: Thu Dec 08, 2005 10:46 am    Post subject: Reply with quote

Here is the requirement :

Input File-1 --> LRECL = 150 RECFM=FB with 12000 records
Input File-2 --> LRECL = 150 RECFM=FB with 12000 records

Key --> 49-60 is the key in both the files.

We need to drop the rows from File-1, if the key is matching with File-2 record.

Example :

File-1
------
ABC
XYZ
PQR

File-2
------
ABC
123
STR

O/p should be :
-----------------
XYZ
PQR
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Dec 08, 2005 10:51 am    Post subject: Reply with quote

sushma4satya,

Check this link

http://www.mvsforums.com/helpboards/viewtopic.php?t=5399

Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sushma4satya
Beginner


Joined: 04 Nov 2005
Posts: 14
Topics: 4

PostPosted: Thu Dec 08, 2005 10:58 am    Post subject: Reply with quote

Hi Kolusu,

We have searched the forum and took your solution from one of the post, here we are trying to tell you that creating dynamic INCLUDE doesn't support for more rows. We have tested the same with 20 records and it is working perfectly, but it not with 12000 rows.

Anyone can help us on this ?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Dec 08, 2005 11:14 am    Post subject: Reply with quote

Quote:

We have searched the forum and took your solution from one of the post, here we are trying to tell you that creating dynamic INCLUDE doesn't support for more rows. We have tested the same with 20 records and it is working perfectly, but it not with 12000 rows.

Anyone can help us on this ?


sushma4satya,

Did you even look at the link I posted? Evil or Very Mad Please go thru it once again and come back if it did not answer your question. The solutions posted in that topic does not dynamically generate the include conditions. Check it once again.


Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu Dec 08, 2005 11:58 am    Post subject: Reply with quote

sushma4satya,

Here's a DFSORT/ICETOOL job that will do what you asked for. I assumed that:
1) There are no duplicates in File-1.
2) There are no duplicates in File-2.
3) You want the output records in their original order.

Code:

//STEP1     EXEC PGM=ICETOOL
//TOOLMSG   DD SYSOUT=*
//DFSMSG    DD SYSOUT=*
//IN1 DD DSN=...  input file1 (FB/150)
//IN2 DD DSN=...  input file2 (FB/150)
//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/150)
//TOOLIN DD *
* IN1->T1:  Add a sequence number in 151-158
COPY FROM(IN1) TO(T1) USING(CTL1)
* IN2->T1:  Add blanks in 151-158
COPY FROM(IN2) TO(T1) USING(CTL2)
* T1->T2:  Get the nondup records.
SELECT FROM(T1) TO(T2) ON(49,12,CH) NODUPS
* T2->OUT:  Remove the records with blanks in 151-158 (these
* are the records from input file2).  Sort the remaining
* records on the seqnum to get them back in their original order.
* Remove the seqnum.
SORT FROM(T2) TO(OUT) USING(CTL3)
/*
//CTL1CNTL DD *
  OUTREC OVERLAY=(151:SEQNUM,8,ZD)
/*
//CTL2CNTL DD *
  OUTREC OVERLAY=(151:8X)
/*
//CTL3CNTL DD *
  OMIT COND=(151,1,CH,EQ,C' ')
  SORT FIELDS=(151,8,ZD,A)
  OUTREC FIELDS=(1,150)
/*

_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group