Subject: | |
From: | |
Reply To: | |
Date: | Mon, 24 May 1999 12:56:35 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Terry Prime shows a job snippet (snipped further here):
> FILE DDFS.SYSOPER,OLD;DEV=DISC
> FILE DDFS1.SYSOPER,OLD;DEV=DISC
> FILE DDFS2.SYSOPER,OLD;DEV=DISC
> IF HPDAY=7 THEN
> PURGE DDFS1.SYSOPER.SYS
> PURGE DDFS2.SYSOPER.SYS
> COPY DDFS.SYSOPER,DDFS1.SYSOPER
> COPY DDFS.SYSOPER,DDFS2.SYSOPER
> ECHO !DIR>DDFS1.SYSOPER.SYS
[snip more code]
> This creates a temporary file which is unfortunately deleted when the
> session is discontinued. I thought that the DEV=DISC parameter would
> create a permanent file on disc. What am I missing?
I believe Tad Bochan was right on the money, but I'd like to elaborate
a bit.
1. The :copy command is smart enough to put the target file in the same
domain (perm or temp) as the source file. Since DDFS is permanent,
DDFS1 will be permanent as well.
This means that DDFS1 really *does* exist as a permanent file. Right?
It's just that it's empty at EOJ because...
2. The :echo command assumes it is writing to a temp file unless BOTH of
the following are true:
a. something like :FILE DDFS1.SYSOPER,OLD is issued
AND b. the :file equation is referenced explicitly as Tad stated,
e.g., :ECHO !DIR>*DDFS1.SYSOPER
3. Please please please do *something* to set off the :if statement.
I may speak a heresy, but indenting the body of the :if is not the
only technique here.
If the block is relatively short, then certainly indenting is helpful.
For a long :if block, you may want to use something like
# ------------------------------------------------------------
if hpday = 7
statement 1
statement 2
...
statement n
endif
# ------------------------------------------------------------
Of course, this works only to a point, but it's a thought.
--Glenn
.......................................................................
Item Subject: cc:Mail Text
|
|
|