Page 1 of 1

Is file comparison possible?

Posted: 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'"


Re: Is file comparison possible?

Posted: Thu May 09, 2019 2:34 pm
by dovetail
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.