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

Trailing blanks in VB dataset

252 views
Skip to first unread message

Bernd Oppolzer

unread,
May 1, 2013, 7:20:15 AM5/1/13
to
Hello,

when copying a FB 80 member to a VB 4096 dataset,
trailing blanks in the FB 80 member seem to be removed,
is this true? I did the copy using TSO ISPF 3.3.

The FB 80 member contains a XML document which originally comes
from a UNIX machine, and it is split in fixed parts, so the new record
starts anywhere in between (maybe in the middle of a XML tag).

The XML parser which reads the document is a C program. In the past
it used fgets and read the document as a textfile, but that's not ok
in this case, because the splitted lines will cause XML syntax errors
(due to the line feed which appear in the middle of the tags etc.).

So I added an option to read the file as a binary file (fopen with
"rb,type=record" and fread instead of fgets). In this case there are
no line feeds at the end of the lines (which were not there
originally in Unix).

This works perfect, if the file is an FB file, and the blanks at the
end of the lines are preserved. But if I copy the file to a VB file, the
trailing blanks are removed, and the XML document is in error (in some
places).

So my question:

can I copy a FB file to a VB file and keep the trailing blanks? Can
this be done using the TSO ISPF dialog, or is a batch job needed?

And: what about the ISPF editor? If I edit the VB file and save it,
will the trailing blanks always be removed, or are there options
to preserve the trailing blanks?

What will FTP do, if the file is transferred from Unix as a
text file into a VB 4096 file? For example, if the text file on
Unix has no line feeds originally, but there are blanks at the
positions 4094, 4095, 4096.: will they be stored or removed ??

Is it better to use FB in such cases? The XML file of possibly
unlimited length has to be transferred to z/OS and processed there ...

Kind regards

Bernd

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to list...@listserv.ua.edu with the message: INFO IBM-MAIN

Charles Mills

unread,
May 1, 2013, 7:44:13 AM5/1/13
to
A profile option for the ISPF editor. PRESERVEBLANKS or something like that.

I am surprised that ISPF 3.3 would do that, but try IEGENER in batch. I
would be stunned if it does that.

A SITE option for FTP. PRESERVEBLANKS or something like that.

Charles

John McKown

unread,
May 1, 2013, 8:30:31 AM5/1/13
to
The ftp option is:

quote site trailingblanks

or

quote site notrailingblanks

at least for the IBM ftp server on z/OS 1.12.

ISPF EDIT, use the primary command: PRESERVE ON
ISPF 3.3 copy doesn't seem to have any option. I would hope it preserves
all the data.
--
This is a test of the Emergency Broadcast System. If this had been an
actual emergency, do you really think we'd stick around to tell you?

Maranatha! <><
John McKown

Bernd Oppolzer

unread,
May 1, 2013, 8:41:21 AM5/1/13
to
I found a solution:

when entering the ISPF editor, there is an option:

preserve VB record length (I don't know how it reads in english,
because we have a german installation).

If this option is set, you can open the VB dataset and then copy the
FB member into it. If you then save the VB dataset, the trailing blanks
are there.
And then the XML parser works as desired, given this VB dataset as input.

If seen no similar option for 3.3 so far. Maybe there is a solution with
IEBGENER,
needs still some research.

Same for FTP ... of course there will be a solution also.

Kind regards

Bernd



Am 01.05.2013 13:43, schrieb Charles Mills:
> A profile option for the ISPF editor. PRESERVEBLANKS or something like that.
>
> I am surprised that ISPF 3.3 would do that, but try IEGENER in batch. I
> would be stunned if it does that.
>
> A SITE option for FTP. PRESERVEBLANKS or something like that.
>
> Charles
>
>

Paul Gilmartin

unread,
May 1, 2013, 10:36:16 AM5/1/13
to
On Wed, 1 May 2013 07:43:42 -0400, Charles Mills wrote:

>A profile option for the ISPF editor. PRESERVEBLANKS or something like that.
>
PRESERVE, simply, IIRC. And (as documented) it preserves not trailing
blanks but line legths. If you insert characters it deletes trailing blanks;
if you delete characters it adds trailing blanks to compensate.

I wonder who requested that.

>I am surprised that ISPF 3.3 would do that, but try IEGENER in batch. I
>would be stunned if it does that.
>
ISPF 3.3 has done that for 30 years in my experience. And worse: it even
removed trailing blanks copying VB to VB.

IEBGENER is your friend.

>A SITE option for FTP. PRESERVEBLANKS or something like that.

Or, FTP to a UNIX file. FTP is more honest in that case.

-- gil

Charles Mills

unread,
May 1, 2013, 10:56:23 AM5/1/13
to
Some of these things might be useful behaviors in specific situations but are bizarre as defaults (or in the case of 3.3, apparently, as the *only* behavior).

I knew the basic behavior of the ISPF editor but was not aware of the behavior you describe. (I use it for source code editing, mostly FB 80 assembler or JCL, so I never have problems with the subtleties you describe.) *Sounds* to me like one of those "it works this way because it was convenient to my internal logic" implementations. Sigh. I guess perhaps it is literally "preserve the existing line length, whatever it is." Possibly someone wrote a requirement "if there are trailing blanks, don't delete them, preserve the original length" and the programmer focused on a literal interpretation of that last phrase.

Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-...@LISTSERV.UA.EDU] On Behalf Of Paul Gilmartin
Sent: Wednesday, May 01, 2013 10:36 AM
To: IBM-...@LISTSERV.UA.EDU
Subject: Re: Trailing blanks in VB dataset

On Wed, 1 May 2013 07:43:42 -0400, Charles Mills wrote:

>A profile option for the ISPF editor. PRESERVEBLANKS or something like that.
>
PRESERVE, simply, IIRC. And (as documented) it preserves not trailing blanks but line legths. If you insert characters it deletes trailing blanks; if you delete characters it adds trailing blanks to compensate.

I wonder who requested that.

>I am surprised that ISPF 3.3 would do that, but try IEGENER in batch. I
>would be stunned if it does that.
>
ISPF 3.3 has done that for 30 years in my experience. And worse: it even removed trailing blanks copying VB to VB.

IEBGENER is your friend.

>A SITE option for FTP. PRESERVEBLANKS or something like that.

Or, FTP to a UNIX file. FTP is more honest in that case.

Shmuel Metz , Seymour J.

unread,
May 1, 2013, 5:37:55 PM5/1/13
to
In <8415919376477932.WA...@listserv.ua.edu>, on
05/01/2013
at 09:36 AM, Paul Gilmartin <PaulGB...@AIM.COM> said:

>IEBGENER is your friend.

With friends like that, ...

--
Shmuel (Seymour J.) Metz, SysProg and JOAT
Atid/2 <http://patriot.net/~shmuel>
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)
0 new messages