HP3000-L Archives

March 2006, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Dave Powell, MMfab" <[log in to unmask]>
Reply To:
Dave Powell, MMfab
Date:
Fri, 24 Mar 2006 10:53:10 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (85 lines)
Start with a simple program that generates a 132-column, fixed length report.
Run it with output to a spool file, like:

file rptfile; dev=lp,1
run progname

Then run it with output to a permanent cctl file, like:

file  rptfile = permfile, new; dev=disc; cctl; save &
  ; rec=,32,f,ascii; disc=60000,32,0
run progname

Finally send the perm file to a spool file, like:

file newspool; dev=lp,1; cctl
print  permfile > *newspool

Questions
1: Are the two spoolfiles identical ?
2: What about the printouts ?


Answers:

1:  The spool files should be identical except for trailing blanks.  The 1st
spoolfile has all 133-column records for the actual report output (plus
special zero-length records at the beginning and end).  The second file may
have some shorter records because trailing blanks have magically disappeared.
So, the second may be much smaller, and will look more like a "real" variable
length file. Check the file size with:
calc finfo("o###.out.hpspool","bytefilesize").

Just because spool files are 'variable' doesn't mean anything eats blanks your
app sends.  But :print seems to eat them.  Test ":print SomeFixedAsciiFile >
NewTempFile" without any file equations, and see what it builds.

The non-spool file created the 2nd time the pgm runs has all 133-column
records, because omitting the record size in the file-equation causes the
rec-len to be picked up from the program.


2:  What printouts?  The out-pri is 1.  Well, besides that... the printouts
will appear identical, unless your eyesight is good enough to spot trailing
blanks on paper :)
FWIW, most of our big print jobs happen this way -- works like a charm.


Ps:  I have a little command-file that (slowly) reports info on a cctl file -- 
the cctl code, the first few bytes of the data, and the record length.  I can
post it if anyone would like to test their own files.  For my 1st spoolfile,
the 1st few lines are:    (best viewed fixed-font)

Line  Cctl-code            Data        RecLength
   1;           {none}    ;                ;   0
   2;  49   %61 CondEject ;Date: 03/23/06  ; 133
   3; 129  %201 Adv1      ;                ; 133
   4; 130  %202 Adv2      ; Qlty.  Patt.  C; 133
   5; 129  %201 Adv1      ;   No.    No.   ; 133
   6; 130  %202 Adv2      ;   111      3   ; 133
   7; 129  %201 Adv1      ;            4   ; 133
but for the 2nd spoolfile:

Line  Cctl-code            Data        RecLength
   1;           {none}    ;                ;   0
   2;  49   %61 CondEject ;Date: 03/23/06  ; 119
   3; 129  %201 Adv1      ;                ;  89
   4; 130  %202 Adv2      ; Qlty.  Patt.  C;  78
   5; 129  %201 Adv1      ;   No.    No.   ;  78
   6; 130  %202 Adv2      ;   111      3   ; 124
   7; 129  %201 Adv1      ;            4   ;  78

the non-spool file created in between looks like:

Line  Cctl-code            Data        RecLength
   1;  67  %103 NoAutoPage;                ; 133
   2;  65  %101 PreSpace  ;                ; 133
   3;  49   %61 CondEject ;Date: 03/23/06  ; 133
   4; 129  %201 Adv1      ;                ; 133
   5; 130  %202 Adv2      ; Qlty.  Patt.  C; 133
   6; 129  %201 Adv1      ;   No.    No.   ; 133
   7; 130  %202 Adv2      ;   111      3   ; 133

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2