0

this code is about 1000 lines really and i have 5 tables. I can get the source for comparison but it has these seq numbers. How can I remove these seq numbers and the occassional date on the right side?

 1400 -- Engraving Processing
   1500 -- Count for Previous Day
   1600 Insert into 
   1700 SELECT count(*) FROM CICCCDAT.OEORH48,CICCCDAT.TRNSTAT2,CICCCDAT.OETRA99
   1800 WHERE OHCOM# = TSCOM# AND OHORD# = TSORD#
   1900 AND (otCOM# = OHCOM# AND OTORD#= OHORD# AND ottrnc = 'AQC')
   2000 AND TSSTAT IN('AEP','BGE')
   2100 AND OHORDT IN('COR','COE','COF')
   2200 AND OHREQD < replace(char(current date, iso), '-', '')  AND OHHLDC = ' ' AND
   2300 OHORD# in(SELECT a.TSORD# FROM CICCCDAT.TRNSTAT2 a
   2400 WHERE a.tsstat IN('AEP','BGE','EAS','REL','STP'));
   2500
   2600 -- Quantity Total Previous Day
   2700 update ISTLIB.CORCOEx set PROGR3PUN =                                                                            07/07/14
   2800 (SELECT COALESCE(SUM(OdQty#),0) FROM
   2900 CICCCDAT.OEORH48,CICCCDAT.TRNSTAT2,CICDAT.OEORD1
   3000   WHERE OHCOM# = TSCOM# AND OHORD# = TSORD# AND OHCOM# = ODCOM# AND OHORD# =
   3100 ODORD#
   3200   AND TSSTAT IN('AEP','BGE')
   3300   AND OHORDT IN('COR','COE','COF')
   3400   AND OHREQD < replace(char(current date, iso), '-', '')
   3500   AND OHHLDC = ' '
   3600   AND ODPRLC = 'ENG'
   3700   AND substr(odprt#,1,5) <> 'NOENG' AND OHORD# in(SELECT a.TSORD# FROM
   3800 CICCCDAT.TRNSTAT2 a
   3900 WHERE a.tsstat IN('AEP','BGE','EAS','REL','STP')));
   4000
   4100 -- Count for Today
Adams
  • 195
  • 1
  • 10

2 Answers2

0

Many text editors (Word and Notepad++ included) will allow to to make a vertical (column) selection. Hold down Alt while dragging over the section you want to remove, and hit Delete.

Community
  • 1
  • 1
D Stanley
  • 149,601
  • 11
  • 178
  • 240
0

Open PowerShell and type in

(cat YourFileName) | % { $_ -replace " +\d+", "" }

Once you have verified the data (you might have to change " +\d+"), run

(cat YourFileName) | % { $_ -replace " +\d+", "" } | Set-Content YourFileName

and your file would have no numeric line prefixes.

The "occassional date" would have to be taken care of manually as there seems to be no set pattern that the machine can use.

amit_g
  • 30,880
  • 8
  • 61
  • 118