Is file comparison possible?

Discussion of Dovetailed Technologies Dataset Pipes tools
Post Reply
Posts: 4
Joined: Fri Oct 05, 2018 1:55 pm

Is file comparison possible?

Post by » Sun Apr 28, 2019 10:53 am

I have transferred a file to a dataset. I'd like to compare the text files from my local system that contains ASCII characters to the mvs dataset generated and display all the differences by byte number and octal byte format in EBCDIC. Is this possible through CO:Z?

#Copies my file to an MVS dataset
todsn -o 'recfm=fb,lrecl=80' //MVS1.DATASET1 < myfile

#Opens the dataset version generated
cozclient cat "//'MVS1.DATASET1.G0002V00'"

#My attempt to compare source file to destination file
Cozclient cmp -l filecodeset=ISO8859-1,pgmcodeset=IBM-1047 "dir1/myfile" "//'MVS1.DATASET1.G0002V00'"


Site Admin
Posts: 1890
Joined: Thu Jul 29, 2004 12:12 pm

Re: Is file comparison possible?

Post by dovetail » Thu May 09, 2019 2:34 pm

This works from my Linux desktop:

Code: Select all

$ cozcontrol start -ssh
$ cmp <(fromdsn // /etc/services

fromdsn(TCPIP.ETC.SERVICES)[N]: 138 records/11040 bytes read; 4765 bytes written in 0 milliseconds.
/dev/fd/63 /etc/services differ: byte 2, line 1
fromdsn-client(5264)[E]: handleCmdIO: (nonblocking) write error on stdout: Broken pipe
The error from fromdsn-client is because cmp closes the input pipe file from fromdsn without reading it all when it finds a difference.

Post Reply