View previous topic :: View next topic
Author
Message
Preetha Pree New User Joined: 21 Oct 2010Posts: 8
Hi,
Can someone help me on this requirement.
1. Count records from two different files
2. Find difference between two files, if difference is < 10 then I can proceed with next steps else I should abend the job.
Suppose counts are in a dataset as
6451
6440
Then I need to find difference in these counts.
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Here's a DFSORT/ICETOOL job that will count the records in both files and give RC=0 if the difference is < 10 or RC=16 if the difference is >= 10.
Code:
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... input file1
//IN2 DD DSN=... input file2
//CT DD DSN=&&CT,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(MOD,PASS)
//OUT DD DUMMY
//TOOLIN DD *
COPY FROM(IN1) USING(CTL1)
COPY FROM(IN2) USING(CTL2)
COPY FROM(CT) TO(OUT) USING(CTL3)
/*
//CTL1CNTL DD *
OUTFIL FNAMES=CT,REMOVECC,NODETAIL,
TRAILER1=(1:COUNT=(TO=ZD,LENGTH=8))
/*
//CTL2CNTL DD *
OUTFIL FNAMES=CT,REMOVECC,NODETAIL,
TRAILER1=(11:COUNT=(TO=ZD,LENGTH=8))
/*
//CTL3CNTL DD *
INREC IFTHEN=(WHEN=GROUP,RECORDS=2,PUSH=(1:1,8)),
IFTHEN=(WHEN=(11,8,CH,NE,C' '),
OVERLAY=(21:1,8,ZD,SUB,11,8,ZD,TO=ZD,LENGTH=8))
OUTFIL FNAMES=OUT,NULLOFL=RC16,OMIT=(21,8,CH,EQ,C' ',OR,
(21,8,CH,NE,C' ',AND,21,8,ZD,GE,+10))
/*
Back to top
Preetha Pree New User Joined: 21 Oct 2010Posts: 8
Thank you Frank!
But am getting Syntax error:
Thanks Frank!
But am getting INREC SYntax error
INREC IFTHEN=(WHEN=GROUP,RECORDS=2,PUSH=(1:1,8)),
*
IFTHEN=(WHEN=(11,8,CH,NE,C' '),
OVERLAY=(21:1,8,ZD,SUB,11,8,ZD,TO=ZD,LENGTH=8)
OUTFIL FNAMES=OUT1,NULLOFL=RC16,OMIT=(21,8,CH,EQ,C' ',OR,
(21,8,CH,NE,C' ',AND,21,8,ZD,GE,+10))
WER428I CALLER-PROVIDED IDENTIFIER IS "0003"
WER268A INREC STATEMENT : SYNTAX ERROR
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
The job works fine with DFSORT. The WER messages indicate you're using Syncsort, not DFSORT. I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.
Back to top
Preetha Pree New User Joined: 21 Oct 2010Posts: 8
Please help on the below error
INREC IFTHEN=(WHEN=GROUP,RECORDS=2,PUSH=(1:1,8)),
*
IFTHEN=(WHEN=(11,8,CH,NE,C' '),
OVERLAY=(21:1,8,ZD,SUB,11,8,ZD,TO=ZD,LENGTH=8)
OUTFIL FNAMES=OUT1,NULLOFL=RC16,OMIT=(21,8,CH,EQ,C' ',OR,
(21,8,CH,NE,C' ',AND,21,8,ZD,GE,+10))
WER428I CALLER-PROVIDED IDENTIFIER IS "0003"
WER268A INREC STATEMENT : SYNTAX ERROR
Someone please help
Back to top
dick scherrer Moderator Emeritus Joined: 23 Nov 2006Posts: 19243 Location: Inside the Matrix
Hello,
Which release of Syncsort is being used? This is shown at the top of the informational output generated by a run.
Back to top
Preetha Pree New User Joined: 21 Oct 2010Posts: 8
SYNCTOOL RELEASE 1.5.3 - COPYRIGHT 2004 SYNCSORT INC
Back to top
dick scherrer Moderator Emeritus Joined: 23 Nov 2006Posts: 19243 Location: Inside the Matrix
Hello,
What happens if you run your process using sort rather than synctool?
Show which release of the sort (rather than synctool) is invoked when you try this.
Back to top
Preetha Pree New User Joined: 21 Oct 2010Posts: 8
Hi,
Please find below
SYNCSORT FOR Z/OS 1.2.3.1NI
Back to top
dick scherrer Moderator Emeritus Joined: 23 Nov 2006Posts: 19243 Location: Inside the Matrix
Hello,
Your product release is not current.
WHEN=GROUP is available in the current release.
Back to top
Preetha Pree New User Joined: 21 Oct 2010Posts: 8
1. Count records from two different files
2. Find difference between two files, if difference is < 10 then I can proceed with next steps else I should abend the job.
Suppose counts are in a dataset as
6451
6440
Then I need to find difference in these counts.
Can you help me how this can be accomplished with this vesion
Back to top
Arun Raj Moderator Joined: 17 Oct 2006Posts: 2481 Location: @my desk
Preetha,
You can try this SYNCTOOL alternative.
Code:
//STEP01 EXEC PGM=SYNCTOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... input file1
//IN2 DD DSN=... input file2
//T1 DD DSN=&T1,DISP=(,PASS),UNIT=SYSDA
//T2 DD DSN=&T2,DISP=(,PASS),UNIT=SYSDA
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN1) TO(T2) USING(CTL1)
//CTL1CNTL DD *
OUTFIL REMOVECC,NODETAIL,
TRAILER1=('CNT1,+',COUNT=(M11,LENGTH=8),80:X)
//STEP02 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=&T1,DISP=(SHR,PASS)
//SYMNAMES DD DSN=&T2,DISP=(SHR,PASS)
//OUT DD DUMMY
//SYSIN DD *
OPTION COPY
INREC BUILD=(7,8,ZD,SUB,CNT1,M11,LENGTH=8)
OUTFIL FNAMES=OUT,INCLUDE=(1,8,ZD,LT,10),NULLOFL=RC4
Back to top
dick scherrer Moderator Emeritus Joined: 23 Nov 2006Posts: 19243 Location: Inside the Matrix
Hi Arun,
Thanks for keeping an eye on us
d
Back to top
Preetha Pree New User Joined: 21 Oct 2010Posts: 8
Hi,
I am getting below error... please help
Code:
IEC141I 013-20,IGG0191A,DLPXV1R,STEP040,SYMNAMES,VIO , ,SYS10295.T135916.RA
+WER999A DLPXV1R ,STEP040 , - UNSUCCESSFUL SORT 013 S REASON=00000020
IEA995I SYMPTOM DUMP OUTPUT 696
SYSTEM COMPLETION CODE=013 REASON CODE=00000020
Back to top
dick scherrer Moderator Emeritus Joined: 23 Nov 2006Posts: 19243 Location: Inside the Matrix
Hello,
Incorrect dcb parameter(s) specified.
Back to top
Preetha Pree New User Joined: 21 Oct 2010Posts: 8
Thank you its working fine..
Back to top
dick scherrer Moderator Emeritus Joined: 23 Nov 2006Posts: 19243 Location: Inside the Matrix
Good to hear it is workng - thank you for letting us know
d
Back to top
Arun Raj Moderator Joined: 17 Oct 2006Posts: 2481 Location: @my desk
Hi Dick,
Thanks for the follow up. I thought I messed up the syntax somewhere as our security policies don't allow to "copy" the jcl.(Lot of typing required)
Back to top
dick scherrer Moderator Emeritus Joined: 23 Nov 2006Posts: 19243 Location: Inside the Matrix
Hi Arun,
Quote:
our security policies don't allow to "copy" the jcl
Because i'm such a terrible typist these days, i make a local copy and edit out the site-specific content which conceals dsns, ids, ip addresses, etc
d
Back to top
Please enable JavaScript!