removing-leading-blank-records.rex

Pipelines v2.1

 

.....|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+....10...

Home

     **** Top of file ****
   1
   2 /* The following pipeline displays the file: winston.txt, on the console. The pipeline does
   3    not display the leading blank lines; the FROMLABEL stage only begins selecting records
   4    once a non-blank record has been read. */
   5
   6 Address Rxpipe
   7
   8 'pipe < &installdrive:\&installpath\examples\input\winston.txt',
   9      '| take 13',     /* Select only the first 13 records. */
  10         /* Start reading from the first non-blank record. */,
  11      '| fromlabel zone(11-*)',
  12      '| cons'         /* Display on the console. */
  13
  14 Say 'Hit Enter to close..'
  15 Parse Pull
  16
  17 Exit 0
     **** End of file ****
 

Console output

 
.....|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+....10...
   1 It was a bright cold day in April, and the clocks were striking thirteen.
   2 Winston Smith, his chin nuzzled into his breast in an effort to escape the vile
   3 wind, slipped quickly through the glass doors of Victory Mansions, though not
   4 quickly enough to prevent a swirl of gritty dust from entering along with him.
   5
   6 The hallway smelt of boiled cabbage and old rag mats. At one end of it a
   7 coloured poster, too large for indoor display, has been tacked to the wall. It
   8 depicted simply an enormous face, more than a metre wide: the face of a man
   9 about forty-five, with a heavy black moustache and ruggedly handsome features.
  10 Winston made for the stairs.
  11 Hit Enter to close..