Thank you, Hein and Craig.

 perl -v

This is perl 5, version 14, subversion 2 (v5.14.2) built for VMS_AXP

...

running on VMS 8.3

I apologize to the list for being a bit hasty, but really appreciate
the feedback.  The actual code I have (as opposed to what I
typed in, in panic mode, is exactly the same as what Craig ran.

I am to blame (of course). When the job runs in batch, it does
the right thing. I suspect there was something I did when I ran
it interactively, but testing again just now, the interactive
version ran fine as well. I'm sure I saw hard returns in the
output lines, at 132 characters, but I built those up by
reading the output of $show entry/full (into an array),
using chomp, picking it apart, and then concatenating it.

When I do $ show entry on a T4 job, I see this:

  Entry  Jobname         Username     Blocks  Status
  -----  -------         --------     ------  ------
   9208  T4$COLLECT      SYSTEM               Holding until  9-JUL-2012 
11:59:00.00
         On available batch queue J$SYSMGR
         Submitted  8-JUL-2012 11:59:01.76 /KEEP 
/LOG=$1$DGA104:[SCRATCH.MONITOR_DATA.J]T4$COLLECT_J.LOG; /NOTIFY
         /PARAM=("9-JUL-2012 12:01:00.00/10-JUL-2012 
11:59:00.00","MON/","J$SYSMGR","LLA0:,EWC0:,EWD0:","FRIEDBERG","60",
         "$1$DGA104:[SCRATCH.MONITOR_DATA.J]","99,99,10,0,0,0,N,0,,Y,,") 
/NOPRINT /PRIORITY=100 /RESTART=J$SYSMGR
         File: _$1$DGA99:[VMS$COMMON.T4$SYS]T4$COLLECT.COM;4

This is captured in the batch output file:

<entry>9208</entry>
<username>SYSTEM</username>
<submit_time>08-Jul-2012 11:59:01.76</submit_time>
<job_status>/AFTER:09-Jul-2012 11:59:00.0</job_status>
<file>_$1$DGA99:[VMS$COMMON.T4$SYS]T4$COLLECT.COM;4</file>
<keep>1</keep>
<logs>$1$DGA104:[SCRATCH.MONITOR_DATA.J]T4$COLLECT_J.LOG;</logs>
<notify>1</notify>
<priority>100</priority>
<param>("9-JUL-2012 12:01:00.00/10-JUL-2012 
11:59:00.00","MON/","J$SYSMGR","LLA0:,EWC0:,EWD0:","FRIEDBERG","60","$1$DGA104:[SCRATCH.MONITOR_DATA.J]","99,99,10,0,0,0,N,0,,Y,,")
 </param>

No hard returns. Mea culpa, but I can't explain why I was seeing those hard 
returns Sunday afternoon, but not now...

Thanks again for the quick feedback, and sorry to waste your time.

Carl Friedberg
www.esb.com
The Elias Book of Baseball Records
2012 Edition


-----Original Message-----
From: Craig A. Berry [mailto:craigbe...@mac.com] 
Sent: Sunday, July 08, 2012 10:05 PM
To: Carl Friedberg
Cc: 'VMSperl Mailing List'
Subject: Re: print statement froces new line at 132 chars?


On Jul 8, 2012, at 2:08 PM, Carl Friedberg wrote:

> Hi,
> 
> I'm sure I've missed something, and am about to do serious googling,
> but does anyone here happen to know how to encourage the print
> statement not to break lines at 132 chars?
> 
> I have a 200-characacter string  $y that I want to write to a file,
> but if I do this:
> 
> open XML, "> something.xml"
> 
> print XMLO '<',$x,'>',$y,'</',$x,'>',"\n";
> 
> the print commands inserts a hard return after each 132 characters.


I cannot reproduce this with either 5.12.3 or with blead, even if I create the 
file first with DCL and then create a new version with Perl.  I'm doing the 
following:

open XML, "> something.xml";
my $x = 'tag';
my $y = 'W' x 200; 
print XML '<',$x,'>',$y,'</',$x,'>',"\n";

So something is different about your environment or what you're doing.  Are you 
sure there are no embedded newlines in $y?

________________________________________
Craig A. Berry
mailto:craigbe...@mac.com

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser

Reply via email to