How are you?
By default, Natural on Open Systems saves Line Numbers in the source file (eg. myprog.NSP) even when Line Numbers are toggled off in the Natural editor.
The default behaviour may be changed via the FTOUCH utility.
To suppress the saving of line numbers:
C:\Program Files\Software AG\Natural\6.3\Bin\ftouch.exe lib=mylib suprln=ON
NB. You must then re-SAVE the Natural source(s).
To enable the saving of line numbers:
C:\Program Files\Software AG\Natural\6.3\Bin\ftouch.exe lib=mylib suprln=OFF
I’m not very familiar with Natural on Open systems.
Perhaps the Natural utility Object Handler is an option for you.
You can UNLOAD the Natural sources with the options:
SUBSTITUTE : Replaces line references by labels during the unload in Transfer format.
This option only applies if your source-code line numbers are used for statement references. If so, the line numbers of referenced lines and the line number references are replaced by labels. The sources are not modified in the database.
INCLUDE-LINE-NUMBERS: Transfers line numbers during the unload in Transfer format.
By default, line numbers in Natural objects are not unloaded.
Then LOAD the sources with the Object Handler in a new library with the default of suprln=off like Wolfgang mentioned. (I don’t know whether this works. As said, I’m not familiar with Natural on Open Systems).
Besides the fact that it isn’t required to move the sources at all with the method I described above,
with Natural Studio (or Natural ONE) the easier way (compared to SYSOBJH) would be to simply
drag-and-drop the sources to a different library and back, in combination with the correct SUPRLN setting.
I tried this, but it didn’t work.
All line numbers are suppressed, but all “Metasourcecodedata” is overwritten
Name Type Lib Source User Source Date
NUASSHD Copycode NUNIT Macke 2010-02-09 15:39
NUASSP PDA NUNIT MWESSJOH 2011-09-12 08:19
NUASSP LDA NUNIT MWESSJOH 2011-09-12 08:19
Now I’m the Source Owner. I don’t want to touch this.
By the way, you can see, that this method doesn’t work for copycodes.
To keep the metadata simply copy away FILEDIR.SAG before the CATALL and back afterwards,
but you are right, there’s no way to strip linenumbers from copycodes this way.
There are a number of subroutines in SYSEXT which you can use here, for example USR2019N to
read and SAVE objects (including copycodes), so this should take care of it, but you still will have
to push / pop FILEDIR.SAG to keep the “meta data”.