On Sun, 12 Jan 2020 15:19:14 -0600, Lionel B Dyck wrote:

>Thanks for the idea - what I'm trying to avoid is copying (cp) the z/OS 
>dataset to OMVS unless it has changed by comparing it's hash to the hash of 
>the OMVS copy.  Guess either way a copy will have to be done so I might as 
>well just copy the z/OS to OMVS regardless.
> 
Yup.  It might perform better to use "cmp" rather than "cksum".  Either
way you need to use both files:
    
https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.bpxa500/cmp.htm

Rename if different; remove if same.

------------------
On Sun, 12 Jan 2020 15:25:14 -0600, Al Ferguson wrote:
>
>Another option would be to use a REXX that calls the CSF API’s to do this. I 
>think this is the coding you would need:
>
>RC=COPIES('FF'x,4);                  RsC=COPIES('FF'x,4)                       
>             
>ExitDataLnth=COPIES('00'x,4);        ExitData=''                               
>   
>RuleArrayCnt=RIGHT(D2C(1),4,'00'x);  RuleArray=LEFT('SHA-256',8)            
>TextLnth=RIGHT(D2C(LENGTH(Key)),4,'00'x); Text=Key                         
>CVectorLnth=RIGHT(D2C(128),4,'00'x); CVector=COPIES('00'x,C2D(CVectorLnth))
>HashLnth=RIGHT(D2C(32),4,'00'x);     Hash=COPIES('00'x,C2D(HashLnth))          
> 
>
>ADDRESS "LINKPGM" "CSNBOWH RC RsC ExitDataLnth ExitData", ...         
>    ...
>CALL CSNBOWH (            ICSF One Way HASH function
>
    LINKPGM?  CALL?  Which?  (I suspect LINKPGM if Rexx; CALL if Assembler.)
    
>     ...
>  text_length,            <=== Integer  Length of Text to be HASHed (multiple 
> of 128 will work for all 3 SHA's)
>  text,                   <=== String   To be HASHed (Pad with ' ' to match 
> text_length)             
>     ...
How is it supposed to tell padding blanks from actual blanks in the data?
Is there a maximum text_length?
Beware line boundary ambiguity.

And you need a step to read the file into the text string.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to