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
-
samb01
- Posts: 433
- Joined: Mon Nov 16, 2009 7:24 pm
- Skillset: quite good
- Referer: by web
- sergeyken
- Posts: 473
- 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: 473
- 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.
-
samb01
- Posts: 433
- Joined: Mon Nov 16, 2009 7:24 pm
- Skillset: quite good
- Referer: by web
Re: compare number lines of two dataset
Hi. Thank's. I just didn't know i have to use Joinkeys.
- sergeyken
- Posts: 473
- 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.
-
samb01
- Posts: 433
- Joined: Mon Nov 16, 2009 7:24 pm
- Skillset: quite good
- Referer: by web
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: 473
- 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
- 6601
-
by sergeyken
View the latest post
Tue Jun 13, 2023 11:04 pm
-
-
- 3
- 5489
-
by sergeyken
View the latest post
Sat Nov 16, 2024 11:05 pm
-
- 2
- 5313
-
by willy jensen
View the latest post
Sat Mar 04, 2023 12:41 pm
-
-
SMTPNOTE - can a font be specified for a dataset?
by Proddish2348 » Sat Jul 01, 2023 5:31 am » in Operating Systems - 0
- 6134
-
by Proddish2348
View the latest post
Sat Jul 01, 2023 5:31 am
-
-
- 1
- 3012
-
by sergeyken
View the latest post
Wed Feb 07, 2024 11:48 pm