Hello. Instead do it by a REXX program,i would like to compare the number of lines of two datasets.
If the number is equal, it's ok, if it's not, it's not ok.
compare number lines of two dataset
- sergeyken
- Posts: 458
- Joined: Wed Jul 24, 2019 10:12 pm
- Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
- Referer: Internet search
Re: compare number lines of two dataset
What exactly prevents you from doing what you want? 

Javas and Pythons come and go, but JCL and SORT stay forever.
- sergeyken
- Posts: 458
- Joined: Wed Jul 24, 2019 10:12 pm
- Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
- Referer: Internet search
Re: compare number lines of two dataset
Code: Select all
//CNTLINES EXEC PGM=SORT
// . . . . . .
//FIRST DD DISP=SHR,DSN=dataset1
//SECOND DD DISP=SHR,DSN=dataset2
//SYSIN DD *
JOINKEYS F1=FIRST,
FIELDS=(1,8,A),SORTED
JOINKEYS F2=SECOND,
FIELDS=(1,8,A),SORTED
JOIN UNPAIRED,ONLY
REFORMAT FIELDS=(F1:1,8,F2:1,8),FILL=С'-'
OUTFIL NOTMTOFL=RC4 RC=4 ==> different number of records
//CNTLJNF1 DD *
INREC BUILD=(SEQNUM,8,ZD)
//CNTLJNF2 DD *
INREC BUILD=(SEQNUM,8,ZD)
//SORTOUT DD SYSOUT=*
// . . . . . . .
Javas and Pythons come and go, but JCL and SORT stay forever.
Re: compare number lines of two dataset
Hi. Thank's. I just didn't know i have to use Joinkeys.
- sergeyken
- Posts: 458
- Joined: Wed Jul 24, 2019 10:12 pm
- Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
- Referer: Internet search
Re: compare number lines of two dataset
samb01 wrote:Hi. Thank's. I just didn't know i have to use Joinkeys.
This is one way of doing this.
Other options are possible, too.
Javas and Pythons come and go, but JCL and SORT stay forever.
Re: compare number lines of two dataset
Thank's sergeyken.
Could you just shwo me an other example like i will be able to try the twi solutions ?
Thank's a lot for your help.
Could you just shwo me an other example like i will be able to try the twi solutions ?
Thank's a lot for your help.
- sergeyken
- Posts: 458
- Joined: Wed Jul 24, 2019 10:12 pm
- Skillset: Assembler, JCL, Utilities, PL/I, C/C++, DB2, SQL, REXX, COBOL, etc. etc. etc.
- Referer: Internet search
Re: compare number lines of two dataset
samb01 wrote:Thank's sergeyken.
Could you just shwo me an other example like i will be able to try the twi solutions ?
Thank's a lot for your help.
This is not DO-MY-JOB-FOR-ME forum.
You can create TOTAL COUNT single record for each of input datasets, and then: compare those two records.
Javas and Pythons come and go, but JCL and SORT stay forever.
-
- Similar Topics
- Replies
- Views
- Last post
-
-
compare substring in the same record
by samb01 » Mon Jun 12, 2023 1:08 pm » in DFSORT/ICETOOL/ICEGENER - 10
- 2810
-
by sergeyken
View the latest post
Tue Jun 13, 2023 11:04 pm
-
-
- 3
- 1563
-
by sergeyken
View the latest post
Thu May 13, 2021 1:07 am
-
- 12
- 3812
-
by RalphEagle
View the latest post
Fri Jul 30, 2021 1:00 pm
-
- 2
- 2719
-
by willy jensen
View the latest post
Sat Mar 04, 2023 12:41 pm
-
- 3
- 2641
-
by sergeyken
View the latest post
Sat Nov 16, 2024 11:05 pm