Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PRESERVE

20 views
Skip to first unread message

Paul Gilmartin

unread,
Nov 14, 2009, 12:30:28 PM11/14/09
to
I open a member with ISPF EDIT, which tells me:

ÔøΩ
ÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩ
ÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩ
ÔøΩ Truncation warning. The data you are editing is variable length
data with at ÔøΩ
ÔøΩ least one record that ends with a blank. Saving the data will
result in ÔøΩ
ÔøΩ removal of any trailing blanks from all records. You can issue the
PRESERVE ÔøΩ
ÔøΩ ON command if you don't want the blanks
removed. ÔøΩ
ÔøΩ
ÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩ
ÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩÔøΩ

Actually, that's good; I don't want the trailing blanks. So I enter:

PRESERVE OFF
SAVE

But directly contrary to the message, it doesn't remove "any trailing
blanks" It removes some trailing blanks, but adds a blank to any
initially empty record.

Ouch!

Is there any way to undo this?

Thanks,
gil

Jim Moore

unread,
Nov 14, 2009, 1:43:27 PM11/14/09
to
It's been awhile, but I seem to recall that one of the ISPF utilities - BROWSE or EDIT, can't recall which and don't have mainframe access - will reveal the records at their true length. Especially with HEX ON. I think it's BOWSE.


Jim
Concentrated Logic

----- Original Message -----
From: "Paul Gilmartin" <PaulGB...@AIM.COM>
To: ISP...@LISTSERV.ND.EDU
Sent: Saturday, November 14, 2009 11:29:21 AM GMT -06:00 US/Canada Central
Subject: PRESERVE

I open a member with ISPF EDIT, which tells me:


————————————————————————————————————————————————————————————————————————
——————◊
◊ Truncation warning. The data you are editing is variable length  
data with at ◊
◊ least one record that ends with a blank. Saving the data will  
result in      ◊
◊ removal of any trailing blanks from all records. You can issue the  
PRESERVE  ◊
◊ ON command if you don't want the blanks  
removed.                             ◊

————————————————————————————————————————————————————————————————————————
——————◊

Paul Gilmartin

unread,
Nov 14, 2009, 1:54:13 PM11/14/09
to
On Nov 14, 2009, at 11:43, Jim Moore wrote:

> It's been awhile, but I seem to recall that one of the ISPF
> utilities - BROWSE or EDIT, can't recall which and don't have
> mainframe access - will reveal the records at their true length.
> Especially with HEX ON. I think it's BOWSE.
>

BROWSE in hex shows the blanks. How do I get rid of them?

Thanks,
gil

Jim Moore

unread,
Nov 14, 2009, 2:03:47 PM11/14/09
to
How about HEX ON in edit?

Concentrated Logic

----- Original Message -----
From: "Paul Gilmartin" <PaulGB...@AIM.COM>
To: ISP...@LISTSERV.ND.EDU

Alberto Mazzetto

unread,
Nov 14, 2009, 6:13:39 PM11/14/09
to
Hi gil,

I checked the Edit manual and found:
"PRESERVE OFF causes the editor to truncate trailing blanks. If a line
is empty ISPF saves 1 blank. "

and
"If a variable-length line is completely blank and has no line number,
a blank is added so that the line length is not zero. "

Looks like the ISPF editor really can't handle this.

-Alberto-

Paul Gilmartin

unread,
Nov 14, 2009, 6:32:01 PM11/14/09
to
On Nov 14, 2009, at 16:12, Alberto Mazzetto wrote:
>
> I checked the Edit manual and found:
> "PRESERVE OFF causes the editor to truncate trailing blanks. If a line
> is empty ISPF saves 1 blank. "
>
> and
> "If a variable-length line is completely blank and has no line number,
> a blank is added so that the line length is not zero. "
>
> Looks like the ISPF editor really can't handle this.
>
What's the motivation for this?

-- gil

thoma...@swedbank.se

unread,
Nov 16, 2009, 6:38:17 AM11/16/09
to
Are You saying that You have a dataset with (some) zero length variable-records ?
I didn't even knew that this was possible.
Or did I missunderstand You ?

Regards,
Thomas Berg
__________________________________________
Thomas Berg Specialist IT-U SWEDBANK

> -----Ursprungligt meddelande-----
> Från: ISPF discussion list [mailto:ISP...@LISTSERV.ND.EDU]
> För Paul Gilmartin
> Skickat: den 14 november 2009 18:29
> Till: ISP...@LISTSERV.ND.EDU
> Ämne: PRESERVE


>
> I open a member with ISPF EDIT, which tells me:
>

> ◊
> ——————————————————————————————————————————————————————————————
> ——————————
> ——————◊
> ◊ Truncation warning. The data you are editing is variable
> length data with at ◊ ◊ least one record that ends with a

> blank. Saving the data will

> result in ◊
> ◊ removal of any trailing blanks from all records. You can
> issue the PRESERVE ◊ ◊ ON command if you don't want the blanks
> removed. ◊
> ◊
> ——————————————————————————————————————————————————————————————
> ——————————
> ——————◊

John McKown

unread,
Nov 16, 2009, 6:59:05 AM11/16/09
to
On Mon, 2009-11-16 at 12:36 +0100, thoma...@SWEDBANK.SE wrote:
> Are You saying that You have a dataset with (some) zero length variable-records ?
> I didn't even knew that this was possible.
> Or did I missunderstand You ?
>
>
>
> Regards,
> Thomas Berg
> __________________________________________
> Thomas Berg Specialist IT-U SWEDBANK

I have written zero length records to a variable file. Actually, it is
fairly easy. Create a text file on your desktop with some lines with
nothing in them. FTP the file to z/OS to a RECFM=VB dataset. Use ISPF
__BROWSE__ to look at the file. Do a HEX ON and you'll see a line with
absolutely nothing on it.

But, for some reason, ISPF EDIT does not like saving lines with nothing
in them. Take the above file and EDIT it. Then just SAVE it. The lines
which used to have absolutely nothing in them now have a single blank on
that line.

I agree with Gil that this seems weird.

--
John McKown
Maranatha! <><

thoma...@swedbank.se

unread,
Nov 16, 2009, 7:10:13 AM11/16/09
to
> -----Ursprungligt meddelande-----
> Fr�n: ISPF discussion list [mailto:ISP...@LISTSERV.ND.EDU]
> F�r John McKown
> Skickat: den 16 november 2009 12:59
> Till: ISP...@LISTSERV.ND.EDU
> �mne: Re: SV: PRESERVE

OK, You always learn something new.
Then the added blank seems to be coded by some trainee!

Paul Gilmartin

unread,
Nov 16, 2009, 7:48:35 AM11/16/09
to
On Nov 16, 2009, at 05:09, thomas.berg wrote:

>> -----Ursprungligt meddelande-----
>> Fr�n: ISPF discussion list [mailto:ISP...@LISTSERV.ND.EDU]
>> F�r John McKown
>>

>> On Mon, 2009-11-16 at 12:36 +0100, thomas.berg wrote:
>>> Are You saying that You have a dataset with (some) zero
>> length variable-records ?
>>> I didn't even knew that this was possible.
>>> Or did I missunderstand You ?
>>>

>>> __________________________________________
>>> Thomas Berg Specialist IT-U SWEDBANK
>>
>> I have written zero length records to a variable file.
>> Actually, it is fairly easy. Create a text file on your
>> desktop with some lines with nothing in them. FTP the file to
>> z/OS to a RECFM=VB dataset. Use ISPF __BROWSE__ to look at
>> the file. Do a HEX ON and you'll see a line with absolutely
>> nothing on it.
>>

You see nothing, but, of course there's a 4-byte RDW that
ISPF doesn't show.

>> But, for some reason, ISPF EDIT does not like saving lines
>> with nothing in them. Take the above file and EDIT it. Then
>> just SAVE it. The lines which used to have absolutely nothing
>> in them now have a single blank on that line.
>>
>> I agree with Gil that this seems weird.
>>
>> --
>> John McKown
>> Maranatha! <><
>
> OK, You always learn something new.
> Then the added blank seems to be coded by some trainee!
>

Possibly that trainee was misled by the knowledge that a count
of zero is invalid in a CCW, and failed to understand that the
block will always contain a BDW and an RDW for a count of at
least 8 bytes.

(But is a block 4 bytes long, containing nothing but a BDW with
a count of 4 valid?)

-- gil

Paul Gilmartin

unread,
Nov 16, 2009, 8:51:32 PM11/16/09
to
On 11/16/09 05:09, thoma...@SWEDBANK.SE wrote:
>> -----Ursprungligt meddelande-----
>> Fr�n: ISPF discussion list [mailto:ISP...@LISTSERV.ND.EDU]
>> F�r John McKown
>>
>> But, for some reason, ISPF EDIT does not like saving lines
>> with nothing in them. Take the above file and EDIT it. Then
>> just SAVE it. The lines which used to have absolutely nothing
>> in them now have a single blank on that line.
>>
>> I agree with Gil that this seems weird.
>>
>> --
>> John McKown
>> Maranatha! <><
>
> OK, You always learn something new.
> Then the added blank seems to be coded by some trainee!
>
Thinking on this a little further, the C RTL is affected by
an environment variable, _EDC_ZERO_RECLEN. If _EDC_ZERO_RECLEN
is "N" (the default), empty lines are ignored on input.

I can only conjecture:

o At some time in the distant past, some program was spewing
unsolicited empty lines into its output file (Bogosity #1),
causing problems in a program downstream.

o Rather than fix the problem where it existed, the C RTL was
modified to ignore the empty lines ("offsetting" Bogosity #2).
I believe I have seen this behavior elsewhere, in older code,
perhaps ROSCOE, perhaps a very early SPF (before it morphed
into ISPF).

o So, when ISPF saved a file with empty lines, they effectively
vanished (at least for many applications). Rather than fix
the first two problems, ISPF was modified ("offsetting"
Bogosity #3). Unfortunately, ISPF is insensitive to any
environment variable, such as EDC_ZERO_RECLEN.

And z/OS bears the ever-increasing burden of such Bad History.

-- gil

Jim Moore

unread,
Nov 16, 2009, 9:51:52 PM11/16/09
to
Many, many years ago, I complained to IBM about how variable length records were handled by the ISPF editor. They replied - and I have the letter somewhere - that everything was working "as it should". But it wasn't.

I was working on some kind of conversion where the intermediate "flat files" were all VB. Programmers working on the "old system" were preparing files that would have the EXACT layout of the "new" database records. Long story short, one of the files cause an S0C7 when we tied to load it.  I found the bad record - a packed field without a sign, one lousy little field in a file of about 10,000 records - and decided to just "Go Commando" and edit the field, putting HEX ON and adding the sign.

Bingo! No more S0C7. But, another problem popped up. The last field in one of the "variable records" was the city name, Something like a 25 character, left-justified field. Turns out that the editor was truncating EVERY SINGLE RECORD to the last non-blank, even these 25-character "city names". So a city name like "Akron" in a 25-byte field was chopped off, right after the "N", in "Akron".

I traced this back to the single edit I did on the packed-field, simply adding the sign.

My point to IBM was: Why did other records in the file get chopped? When I edit a single record, I don't expect OTHER records to get changed. Right? Mke sense?

When I saw the PRESERVE option appear about 11-12 years ago, I recall thinking: Oh! They have finally figured out what I was complaining about back in 1988!!!

Jim Moore
Concentrated Logic

----- Original Message -----
From: "Paul Gilmartin" <PaulGB...@AIM.COM>
To: ISP...@LISTSERV.ND.EDU
Sent: Monday, November 16, 2009 7:40:56 PM GMT -06:00 US/Canada Central
Subject: Re: PRESERVE

On 11/16/09 05:09, thoma...@SWEDBANK.SE wrote:
>> -----Ursprungligt meddelande-----

>> Från: ISPF discussion list [mailto:ISP...@LISTSERV.ND.EDU]
>> För John McKown

thoma...@swedbank.se

unread,
Nov 17, 2009, 6:38:50 AM11/17/09
to
IMHO, a law in programming that must not be broken is:
DO NOT ALTER THE DATA OTHER THAN ON AN EXPLICIT REQUEST!

That edit behaves in this way is *lame*! ;>

Regards,
Thomas Berg

__________________________________________
Thomas Berg Specialist IT-U SWEDBANK

> -----Ursprungligt meddelande-----
> Fr�n: ISPF discussion list [mailto:ISP...@LISTSERV.ND.EDU]
> F�r Jim Moore
> Skickat: den 17 november 2009 03:52
> Till: ISP...@LISTSERV.ND.EDU
> �mne: Re: PRESERVE

> >> Fr�n: ISPF discussion list [mailto:ISP...@LISTSERV.ND.EDU]
> F�r John

0 new messages