On 1/24/2014 9:25 AM, Charles Mills wrote:
COBOL does this also, right? My COBOL skills are modest to say the least,
but if FOO is PIC X(5) then MOVE 'Now is the time' TO FOO silently truncates
the literal to 'Now i', correct?

I'm not trying to start a language war here, just saying that the concept of
"silent truncation to fit" should be well-understood by many mainframers,
not just PL/Iers.

Charles

Right. And, in a sense, so does Assembler: length of bytes moved
by MVC is determined by length attribute of the target (unless
explicitly overriden; note that COBOL can override the length, too,
using reference modification).

On the other hand, COBOL also does 'silent padding' to fit, too:
character moves are padded on the right with spaces; numeric
moves are padded to the left and right of the decimal point with
zeros.

--

Kind regards,

-Steve Comstock, founder
The Trainer's Friend

Course materials on sale at list price through March 30, 2014:

  http://www.trainersfriend.com/



-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On
Behalf Of Vernooij, CP (SPLXM) - KLM
Sent: Friday, January 24, 2014 12:00 AM
To: [email protected]
Subject: Re: System Symbols Question

If PL/I does this, it will probably be well understood by PL/I programmers,
but maybe not by others. Rexx has its own way, which will probably be well
understood by Rexx programmers, but maybe not by others.
System Symbol coders may belong to one or both of the above groups or to
none of them. So in this case it is safest to assume nothing and apply the
rules strictly, i.e. assign correctly or abend.

Kees.

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On
Behalf Of John Gilmore
Sent: Thursday, January 23, 2014 16:47
To: [email protected]
Subject: Re: System Symbols Question

There is now long experience with the PL/I convention that assigns a source
string that is longer than the [maximal allocated or declared] length of the
target string with 1) truncation on the right and 2) silently.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to