I already knew about the "tokens" option, but we actually import the copybooks into a client side product (Ivory) that is used for developing webservices. Anyway the Ivory data definitions then contain datanames that include the tokens. It works, but gets a little confusing and ugly. I was...
I am trying to use the COPY REPLACING option in an Enterprise COBOL program and can't seem to get it to work. It compiles cleanly, but seems to ignore the statement. No data is replaced. Here is the code.
COPY TR319XXX REPLACING ==DL== BY ==XL==.
I have tried literals, fields etc. and no...
I guess great minds think alike :)
I did something very similar.
3000-GENERATE-CHARACTER.
COMPUTE SA-RANDOM-NUMBER = FUNCTION RANDOM.
* IF ALREADY SEEDED, DON'T NEED THE PARAMETER
* create the seed date by taking the time out of the
* CURRENT-DATE field...
Only Uppercase A-Z and numbers 0-9. I was thinking I would like to make it any printable EBCDIC character and add some logic (parameters) that could filter it to what you want. We have something working now. I was hopeful there would be a simple function call to do this however.
Two thoughts here. If you don't care about the spaces at the end of each message
("pin error ^signon error ^idiot error ^...etc")
Lunkers suggestion is the way to go. That appears to be the case, since that looks like what you were trying to do with your original string...
Oh yes,
I neglected to mention in my second post that we have been running our VS COBOL II applications using the LE runtime since 1999. As I understand VS COBOL II running WITH LE run-time is supported until December 2004.
Sorry about any confusion.
Stacey
Actually it is supported until December 2004 and we are preparing to migrate sometime in 2004. It did not provide any new functionality that we needed, so we chose to put the cost of migration off for a few years. I was already aware of the callable service for random number generating you...
We have a request to generate a random alphanumeric string of characters for our business using VS COBOL II (MVS) on the mainframe. Any ideas if there are any random character generating functions available in COBOL?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.