Lionel,
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",
"RuleArrayCnt RuleArray TextLnth Text" ,
"CVectorLnth CVector HashLnth Hash"
CALL CSNBOWH ( ICSF One Way HASH function
return_code, ===> Integer
reason_code, ===> Integer
exit_data_length, <==> Integer Length of exit_data
exit_data, <==> String Used by ICSF Installation Exit, if any
rule_array_count, ===> Integer Must be 1 or 2
rule_array, <=== String SHA(3)-256, SHA(3)-384, or SHA(3)-512,
then ONLY (each 8 Bytes)
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)
chaining_vector_length, <==> Integer Must be 128 for non-SHA3, 256 for SHA3
chaining_vector, <==> String ICSF Work are 128 Bytes in Length. Init
to '00'x
hash_length, <=== Integer Length to be Returned (for options
above 32, 48, or 64 respective)
hash) <==> String HASHed Text
_______________
Al Ferguson | mailto:[email protected]
Milwaukee, WI USA | http://www.neptunescove.org
Dulcius ex Asperis
> On 12 January 2020, at 15:19, Lionel B Dyck <[email protected]> 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.
>
>
> Lionel B. Dyck <sdg><
> Website: http://www.lbdsoftware.com
>
> "Worry more about your character than your reputation. Character is what you
> are, reputation merely what others think you are." - John Wooden
>
> -----Original Message-----
> From: IBM Mainframe Discussion List <[email protected]> On Behalf Of
> Al Ferguson
> Sent: Sunday, January 12, 2020 2:49 PM
> To: [email protected]
> Subject: Re: Using OMVS cksum with z/OS datasets
>
> Lionel,
>
> Access to MVS Files from OMVS via "//‘your.filename.goes.here’” only works
> for some commands. Pre-Allocated DD’s are not available to the OMVS thread
> (usually). But you might try a stream … try
>
> [cat | cp] "//‘your.filename.goes.here’” | cksum
>
> I believe you can cat (copy to stdout) or cp (copy to stdout) using the
> "//‘your.filename.goes.here’” format. And then Pipe it to “cksum”. In this
> case I do not think you will see a major performance hit (as you are tossing
> out the copy anyway). Try both and pick the best performing one.
>
>
> _______________
>
> Al Ferguson | mailto:[email protected]
> Milwaukee, WI USA | http://www.neptunescove.org
>
> Dulcius ex Asperis
>
>> On 12 January 2020, at 14:34, Lionel B Dyck <[email protected]> wrote:
>>
>> Is there a way to use the OMVS cksum command against a z/OS dataset?
>>
>>
>>
>> I tried: cksum "//'hlq.test.file'"
>>
>>
>>
>> And it objects but it works great on OMVS files.
>>
>>
>>
>> tia
>>
>>
>>
>>
>>
>> Lionel B. Dyck <sdg><
>> Website: <http://www.lbdsoftware.com/> http://www.lbdsoftware.com
>>
>> "Worry more about your character than your reputation. Character is
>> what you are, reputation merely what others think you are." - John
>> Wooden
>>
>>
>>
>>
>> ----------------------------------------------------------------------
>> For IBM-MAIN subscribe / signoff / archive access instructions, send
>> email to [email protected] with the message: INFO IBM-MAIN
>>
>
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send email to
> [email protected] with the message: INFO IBM-MAIN
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN