View previous topic :: View next topic
|
Author |
Message |
Mahua Mitra
New User
Joined: 26 Apr 2007 Posts: 49 Location: Delhi
|
|
|
|
Hi
I have two files: File1 and File2.
File3 is the output where File3 = File1 - File2 that is File 3 will have only those data which are in file 1 and not in file two.
The key on which it will search is of 4 charecters and starts from the 4th byte position.
in my jcl, i have mentioned the parameters as:
* ADD '11' IDENTIFIER FOR FILE1 RECORDS.
COPY FROM(IN1) TO(T1) USING(CTL1)
* ADD '22' IDENTIFIER FOR FILE2 RECORDS.
COPY FROM(IN2) TO(T1) USING(CTL2)
* SPLICE TO MATCH UP RECORDS AND WRITE THEM TO THEIR
* APPROPRIATE OUTPUT FILES.
/*
//CTL1CNTL DD *
* MARK FILE1 RECORDS WITH '11'
OUTREC FIELDS=(4,4,6:C'11')
/*
//CTL3CNTL DD *
* WRITE FILE1 ONLY RECORDS TO OUT1 FILE. REMOVE ID.
OUTFIL FNAMES=OUT1,INCLUDE=(6,2,CH,EQ,C'11'),OUTREC=(1,4)
but my output is empty
Can anyone please let me know, which parameter is specified incorrectly?
Thanks in advance
Mahua |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
Mahua Mitra
1. Check the disposition of the file T1 is MOD or not.
2. Show the CTL2
3. Show splice statement. |
|
Back to top |
|
|
Mahua Mitra
New User
Joined: 26 Apr 2007 Posts: 49 Location: Delhi
|
|
|
|
sorry for incomplete information. here are the details:
1. both the inpur files are DISP=MOD
2. CTL2 is:
//CTL2CNTL DD *
* MARK FILE2 RECORDS WITH '22'
OUTREC FIELDS=(4,4,6:C'22')
3. Splice statement is:
* SPLICE TO MATCH UP RECORDS AND WRITE THEM TO THEIR
* APPROPRIATE OUTPUT FILES.
Do i need to provide some other parameters, or the syntax is incorrect?
Thanks
Mahua |
|
Back to top |
|
|
Mahua Mitra
New User
Joined: 26 Apr 2007 Posts: 49 Location: Delhi
|
|
|
|
Sorry
Disp of T1 is MOD and not the input files |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
Mahua Mitra
Quote: |
3. Splice statement is:
* SPLICE TO MATCH UP RECORDS AND WRITE THEM TO THEIR
* APPROPRIATE OUTPUT FILES.
|
Your Splice should be some what like this
Code: |
SPLICE FROM(T1) TO(OUT1) ON(4,4,CH) WITH(7,1) USING(CTL3)
|
If the above splice didn't work provide the sample i/p and the o/p expected. |
|
Back to top |
|
|
Mahua Mitra
New User
Joined: 26 Apr 2007 Posts: 49 Location: Delhi
|
|
|
|
this did not worked.
Input1 is:
1035 67580
0001036 0000000054924
0002003 0000000000000
0002003 0000000046154
0002003 0000000046154
0002003 0000000016693
Input2 is:
0002003 0000000000000
0002003 0000000046154
0002003 0000000046154
0002003 0000000016693
0001036 0000000054924
file3 (output) must be:
035 |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
Mahua Mitra
In the below code
Code: |
SPLICE FROM(T1) TO(OUT1) ON(4,4,CH) WITH(7,1) USING(CTL3)
|
i had missed KEEPNODUPS, However will check the i/p's provided by you and get back. |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
Mahua Mitra
Try this
Code: |
//*******************************************************
//STEP001 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD *
1035 67580
0001036 0000000054924
0002003 0000000000000
0002003 0000000046154
0002003 0000000046154
0002003 0000000016693
/*
//IN2 DD *
0002003 0000000000000
0002003 0000000046154
0002003 0000000046154
0002003 0000000016693
0001036 0000000054924
/*
//TMP1 DD DSN=&&TEMP1,DISP=(MOD,PASS),SPACE=(TRK,(5,5)),UNIT=SYSDA
//F1ONLY DD SYSOUT=*
//TOOLIN DD *
COPY FROM(IN1) TO(TMP1) USING(CP01)
COPY FROM(IN2) TO(TMP1) USING(CP02)
SPLICE FROM(TMP1) TO(F1ONLY) ON(4,4,CH) WITH(9,1) -
USING(CP03) KEEPNODUPS
/*
//CP01CNTL DD *
OUTREC FIELDS=(1,7,8:C'11')
/*
//CP02CNTL DD *
OUTREC FIELDS=(1,7,8:C'22')
/*
//CP03CNTL DD *
OUTFIL FNAMES=F1ONLY,INCLUDE=(8,2,CH,EQ,C'11'),BUILD=(2,3)
/*
|
|
|
Back to top |
|
|
Mahua Mitra
New User
Joined: 26 Apr 2007 Posts: 49 Location: Delhi
|
|
|
|
when I am using the following
SPLICE FROM(TMP1) TO(F1ONLY) ON(4,4,CH) WITH(9,1) -
USING(CP03) KEEPNODUPS
I am getting an error:
SPLICE FROM(T1) TO(OUT1) ON(4,4,CH) WITH(7,1) -
KEEPNODUPS USING(CTL3)
SYT020I SYNCSORT CALLED WITH IDENTIFIER "0003"
SYT012E SYNCSORT COMPLETED UNSUCCESSFULLY
SYT030I OPERATION COMPLETED WITH RETURN CODE 16
SYT015I PROCESSING MODE CHANGED FROM "STOP" TO "SCAN" DUE TO OPERATION FAILURE
SYT004I SYNCTOOL PROCESSING COMPLETED WITH RETURN CODE 16
Does that mean that it is using SYNSORT SYNTOOL instead od DFSORT's ICETOOL? |
|
Back to top |
|
|
Mahua Mitra
New User
Joined: 26 Apr 2007 Posts: 49 Location: Delhi
|
|
|
|
Thanks a lot!!!!!
I got the results now (by your JCL)
I was going wrong (a special charecter was coming). |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
Does that mean that it is using SYNCSORT's SYNCTOOL instead of DFSORT's ICETOOL? |
Yes. |
|
Back to top |
|
|
|