HP3000-L Archives

January 1999, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Fontaine, Charles" <[log in to unmask]>
Reply To:
Fontaine, Charles
Date:
Mon, 18 Jan 1999 15:57:40 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (49 lines)
If you have MPEX from Vesoft you can do something like this:

!JOB ....
...
!MPEX
%setvar anyname randomname
%while fexists("!anyname")
%   setvar anyname randomname
%endwhile
%showvar anyname
%exit
!run program;info="!anyname"
...
!EOJ

This assigns a random eight character string to a variable called anyname.
The while, endwhile loop makes sure the file doesn't already exist.  You
then pass the file name into your Cobol program using the INFO string.

Regards,
Charlie Fontaine
NYLCare Health Plans


> ----------
> From:         Brad Feazell[SMTP:[log in to unmask]]
> Sent:         Monday, January 18, 1999 3:00PM
> To:   [log in to unmask]
> Subject:      Clock intrinsic - What is returned?
>
> I'm trying to use the clock intrinsic (in Cobol) to generate a number that
> I
> can use for unique file names but I can't figure out what the clock
> intrinsic is giving me. The intrinsics manual says I should get Hour,
> Minute, Seconds and Tenths of seconds.
>
> Here's the number I get: 220993543. A SHOWTIME command at about the same
> time returns MON, JAN 18, 1999,  1:44 PM.
>
> Maybe I'm using the wrong data type/size for the return value: PIC S9(9)
> BINARY SYNC. I don't have much experience calling system intrinsics.
>
> If anyone knows of a better way to create filenames that are guaranteed to
> be unique, I'd like to hear it.
>
> --
> Brad Feazell
>

ATOM RSS1 RSS2