SHA256 Checksum of a File transmitted from Mainframe to Azure

26 views Asked by At

I have SFTPed a file from Mainframe to Azure in ASCII Mode. I want to comapte the checksum of the Mainframe file against the file in Azure.How can I do that?

  1. I can calcualte the SHA256 of a File in MF in Binary mode i.e. the data is in CP1047.
  2. Have SFTP the file to MF on Azure. Can calcualte the SHA256 in ASCII mode but it doesn't match the SHA256 of the file in Mainframe.

How can I calcualte the SHA256 in Azure using pyhron databricks notebook in binary mode that will match the SHA256 of Mainframe?

1

There are 1 answers

0
Hogstrom On

Since the file is converted from CP1047 to ASCII there is no way to compare the two. An alternate workflow would be to

On the mainframe:

  1. convert the file from CP1047 to ASCII using a utility like iconv.
  2. Calculate the checksum on the file before transmission.
  3. Transfer that file in binary to Azure

In Azure:

  1. Calculate a checksum on the Azure side when the file is received.