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 

Sequntial file compares
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
nagarajan.dharani
Beginner


Joined: 04 Apr 2007
Posts: 20
Topics: 4

PostPosted: Fri Oct 19, 2007 4:31 am    Post subject: Sequntial file compares Reply with quote

Hi,
Can some one help me out in the following requirement.

I have two sequential files of different record length as below.

File1 with length 10

Code:

0000008060
0000009980
0000018060
0000019980
0000108060


File2 with length 223

[code:1:ec70c612a1]
,,,,2005-02-03-18.36.27.078118HOM,,RYAN.BALDI@FEDEX.COM...........
,,,
Back to top
View user's profile Send private message Send e-mail
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Fri Oct 19, 2007 4:47 am    Post subject: Reply with quote

Dharani,

Check the below links.
http://www.mvsforums.com/helpboards/viewtopic.php?t=8144&highlight=compare
http://www.mvsforums.com/helpboards/viewtopic.php?t=11&highlight=match
http://www.mvsforums.com/helpboards/viewtopic.php?t=5399
Back to top
View user's profile Send private message Send e-mail
krisprems
Beginner


Joined: 13 Dec 2006
Posts: 101
Topics: 4
Location: india

PostPosted: Fri Oct 19, 2007 4:55 am    Post subject: Reply with quote

nagarajan.dharani
Are there any duplicate records in i/p file1 or File2?
_________________
cHEERs
krisprems
Back to top
View user's profile Send private message
nagarajan.dharani
Beginner


Joined: 04 Apr 2007
Posts: 20
Topics: 4

PostPosted: Fri Oct 19, 2007 5:54 am    Post subject: Reply with quote

Hi for the following code i am getting an error

E RECORD TYPE IS F - DATA STARTS IN POSITION 1
3 END OF FIELD BEYOND MAXIMUM RECORD LENGTH
0 C5-K26318 C6-K90007 C7-K90000 C8-K23476 E9-K90007 E7-K24705
3 END OF DFSORT

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=VSISNAG.SORT.FPEUNLOD.OUTPUT,DISP=SHR
//IN2 DD DSN=VSISNAG.SORT.INPUT2,DISP=SHR
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=VSISNAG.SORT.OUTPUT,DISP=OLD
//TOOLIN DD *
COPY FROM(IN2) TO(T1) USING(CTL2)
COPY FROM(IN1) TO(T1) USING(CTL1)
SPLICE FROM(T1) TO(OUT) ON(2,10,CH) WITH(1,230) WITHALL -
USING(CTL3)
//CTL1CNTL DD *
INREC BUILD=(1X,1,4,BI,TO=ZD,LENGTH=10,5,219,10X)
//CTL2CNTL DD *
INREC BUILD=(1X,2,10,219:X,231,10)
//CTL3CNTL DD *
OUTFIL FNAMES=OUT,
INCLUDE=(2,10,CH,EQ,26,09,CH),
BUILD=(01,230)

Can soemone pls help me out
Back to top
View user's profile Send private message Send e-mail
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Fri Oct 19, 2007 6:04 am    Post subject: Reply with quote

Dharani,

Check whether your output file has the same length as your input files.
Back to top
View user's profile Send private message Send e-mail
nagarajan.dharani
Beginner


Joined: 04 Apr 2007
Posts: 20
Topics: 4

PostPosted: Fri Oct 19, 2007 6:11 am    Post subject: Reply with quote

file1 length is 223
file2 lenght is 10
Back to top
View user's profile Send private message Send e-mail
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Fri Oct 19, 2007 6:19 am    Post subject: Reply with quote

what is your OUT file length?
Back to top
View user's profile Send private message Send e-mail
nagarajan.dharani
Beginner


Joined: 04 Apr 2007
Posts: 20
Topics: 4

PostPosted: Fri Oct 19, 2007 6:20 am    Post subject: Reply with quote

Out file length should be 223 and should have the simliar format of file1
Back to top
View user's profile Send private message Send e-mail
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Fri Oct 19, 2007 6:23 am    Post subject: Reply with quote

If your OUT file has the length of 223, then you won't face this problem.
Back to top
View user's profile Send private message Send e-mail
krisprems
Beginner


Joined: 13 Dec 2006
Posts: 101
Topics: 4
Location: india

PostPosted: Fri Oct 19, 2007 6:23 am    Post subject: Reply with quote

nagarajan.dharani
This SORT job does what you want
Code:
//*******************************************************               
//GETMATCH EXEC PGM=ICETOOL                                             
//TOOLMSG  DD SYSOUT=*                                                 
//DFSMSG   DD SYSOUT=*                                                 
//IN1      DD file1                                               
//IN2      DD file2
//OUT      DD o/o file, lrecl=223
//TMP1     DD DSN=&&TEMP1,DISP=(MOD,PASS),SPACE=(TRK,(5,5)),UNIT=SYSDA 
//TOOLIN   DD *                                                         
  COPY FROM(IN1) TO(TMP1) USING(CP01)                                   
  COPY FROM(IN2) TO(TMP1) USING(CP02)                                   
  SELECT FROM(TMP1) TO(OUT) ON(1,4,BI) ALLDUPS USING(CP03)             
/*                                                                     
//CP01CNTL DD *                                                         
  OUTREC BUILD=(1,10,ZD,TO=BI,LENGTH=4,224:C'1')                       
//*                                                                     
//CP02CNTL DD *                                                         
  OUTREC OVERLAY=(224:C'2')                                             
//*                                                                     
//CP03CNTL DD *                                                         
  OUTFIL INCLUDE=(224,1,CH,EQ,C'2'),BUILD=(1,223)                       
//*                                                                     

_________________
cHEERs
krisprems
Back to top
View user's profile Send private message
krisprems
Beginner


Joined: 13 Dec 2006
Posts: 101
Topics: 4
Location: india

PostPosted: Fri Oct 19, 2007 6:26 am    Post subject: Reply with quote

nagarajan.dharani wrote:
Out file length should be 223 and should have the simliar format of file1

Looks you are confused, initially you said o/p should be similar to File2
_________________
cHEERs
krisprems
Back to top
View user's profile Send private message
nagarajan.dharani
Beginner


Joined: 04 Apr 2007
Posts: 20
Topics: 4

PostPosted: Fri Oct 19, 2007 6:30 am    Post subject: Reply with quote

Hi,

This is my code and the build here has only 223 characters.

But i am still getting the same error
E RECORD TYPE IS F - DATA STARTS IN POSITION 1
3 END OF FIELD BEYOND MAXIMUM RECORD LENGTH
0 C5-K26318 C6-K90007 C7-K90000 C8-K23476 E9-K90007 E7-K24705
3 END OF DFSORT


//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT) ON(2,10,CH) WITH(1,230) WITHALL -
USING(CTL3)
//CTL1CNTL DD *
INREC BUILD=(1X,1,4,BI,TO=ZD,LENGTH=10,5,219,10X)
//CTL2CNTL DD *
INREC BUILD=(1X,2,10,219X,2,10)
//CTL3CNTL DD *
OUTFIL FNAMES=OUT,
INCLUDE=(2,10,CH,EQ,231,10,CH),
BUILD=(2,10,ZD,TO=BI,LENGTH=4,11,219)
/*
Back to top
View user's profile Send private message Send e-mail
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Fri Oct 19, 2007 6:34 am    Post subject: Reply with quote

Which build here has only 223 characters????

Check if you are using a VB file and also check for your OUT file length. It should be FB and 223.
Back to top
View user's profile Send private message Send e-mail
vivek1983
Intermediate


Joined: 20 Apr 2006
Posts: 222
Topics: 24

PostPosted: Fri Oct 19, 2007 6:35 am    Post subject: Reply with quote

nagarajan.dharani,

Please use [CODE] tags to show your code in the code-format for obtaining better clarity.
_________________
Vivek G
--------------------------------------
A dream is just a dream. A goal is a dream with a plan and a deadline. (Harvey Mackay)
Back to top
View user's profile Send private message
krisprems
Beginner


Joined: 13 Dec 2006
Posts: 101
Topics: 4
Location: india

PostPosted: Fri Oct 19, 2007 7:17 am    Post subject: Reply with quote

nagarajan.dharani

1. SPLICE level of complication is not required for your requirement, the ICETOOL JOB that i have show would suffice your requirement
2. When giving the SYSOUT messages you need to provide the complete message, like including the message code which looks like this ICE*.
3. The snapshot of the message should be clear enough to understand where the JOB has failed, either while splicing or whicle COPYing.. or where?

Keep these things in your mind Pfft
_________________
cHEERs
krisprems
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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