Here goes.

 erase test data o

Ready; T=0.01/0.01 17:55:31

 pipe literal | pad 10 | > test  data . f 10 coerce allowempty

Ready; T=0.01/0.01 17:55:41

 l test data * (iso

FILENAME FILETYPE FM FORMAT LRECL       RECS     BLOCKS     DATE
TIME   
TEST     DATA     O1 F         10          1          1 2008-04-02
17:55:41 
Ready; T=0.01/0.01 17:55:44

 pipe hole | > test data . f 10 coerce allowempty

Ready; T=0.01/0.01 17:56:03

 l test data * (iso

FILENAME FILETYPE FM FORMAT LRECL       RECS     BLOCKS     DATE
TIME   
TEST     DATA     O1 F         10          0          0 2008-04-02
17:56:03 
Ready; T=0.01/0.01 17:56:05


Paul, this is a very workable circumvention.  Thanks very much!!

-----Original Message-----
From: CMSTSO Pipelines Discussion List
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Gilmartin
Sent: Wednesday, April 02, 2008 5:37 PM
To: [email protected]
Subject: Re: [CMS-PIPELINES] Writing an empty file to set RecFM and
LRecL

On Apr 2, 2008, at 15:21, SPITZ, HOBART CTR DFAS wrote:
> It's been a long day.  Does this look right?  If so why?
>
No, but it's likely WAD.  CMS is historically hostile to empty
files; even more to empty records, and will do anything it can
to frustrate the programmer who attempts to employ them.

I suppose the rationale is that in the absence of any record to
establish the record length it reports a default value.

I remember a similar problem when I once FILEDEFed a file as
V 137.  Later, when I re-opened the file for append (MOD),
it loaded in the DCB not my specified 137, but the length of
the longest record previously written.  Ugh.

> Ready; T=0.01/0.01 17:15:57
>
>  pipe hole | > test data . f 10 allowempty
>
> Ready; T=0.01/0.01 17:16:49
>
>  l test data * (iso
>
> FILENAME FILETYPE FM FORMAT LRECL       RECS     BLOCKS     DATE
> TIME
> TEST     DATA     O1 F         80          0          0 2008-04-02
> 17:16:49
> Ready; T=0.01/0.01 17:17:21
>
What happens if you initialize by writing a 10-byte record, then
overwrite with an empty file?

--gil

Reply via email to