Billy, On this page IBM tells you how to set up the C language parameters. Wherever this page says a parameter is “integer” it means “PIC S9(9) BINARY”, where it says “string” it is any “PIC X” of at least the length specified by the matching integer length parameter area. The integer random number output “integer” for CSNBRNG is a 64-bit binary variable “PIC S9(18) BINARY”. For CSNBRNGL is would be a “PIC X” area of the desired length (plus 21 if RT-KRD is used).
https://www.ibm.com/docs/en/zos/2.4.0?topic=keys-random-number-generate-csnbrng-csnerng-csnbrngl-csnerngl HTH Peter From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Billy Ashton Sent: Tuesday, March 11, 2025 10:29 AM To: [email protected] Subject: Using CSNBRNGL Hey all! It's been a while since I bothered y'all, and I hate to do this again, but my manager wants me to do some research on using the Crypto feature to generate "true" random numbers - CSNBRNGL. He thinks this will help us get better, less predictable results for the places we need to use random numbers, and he wants me to see how easy it is to use and how many resources it might use. As this is slated for possible COBOL use, has anyone used it in a COBOL program, and would you share your data definition and code? I have spent hours asking Dr. Google, and have gotten very little info about it. I found the module in our linklist, so that part it easy, but I just can't figure out how to call it. I appreciate your help here! Billy Thank you and best regards, Billy Ashton -- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
