View previous topic :: View next topic |
Author |
Message |
raveendra_ibm Beginner
Joined: 02 Apr 2006 Posts: 32 Topics: 10
|
Posted: Mon Apr 03, 2006 11:40 pm Post subject: Block automatic increment of line numbers ! |
|
|
HI All,
I am doing code changes to an existing code i.e., I am adding a few lines of code to the existing one.
Now whenever I insert a line somewhere in the middle of the code the rest of the line numbers
get automatically incremented. I don't want this to happen.
Doing a 3.13 to the old and new programs should display only those lines of code that were added
by me, instead it shows all the lines where there is change in the line number.
I have tried AUTONUM OFF, etc but it did not work out.
Thanks and Regards,
Raveendra. |
|
Back to top |
|
 |
Phantom Data Mgmt Moderator

Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Tue Apr 04, 2006 12:24 am Post subject: |
|
|
Raveendra,
I did not understand your problem clearly. Which line number are you talking about. The one that appears to the left (columns 1-6) or the ones that appear at the end of member (73-80) ?
To remove seq numbers in first 6 columns (1-6), use the following command.
Code: |
NUM COB; UNNUM; NUM OFF;
|
To remove seq numbers from columns 73-80 use
Code: |
NUM ON; UNNUM; NUM OFF;
|
Thanks,
Phantom |
|
Back to top |
|
 |
raveendra_ibm Beginner
Joined: 02 Apr 2006 Posts: 32 Topics: 10
|
Posted: Tue Apr 04, 2006 1:02 am Post subject: |
|
|
Hi Phantom !
Here are the details :
The line numbers that I was talking about is from 1-6.
Existing Code :
Code:
001200 MOVE A TO B.
001300 ADD B TO D.
001400 SUB 10 FROM D.
001500 DISPLAY A.
001600 DISPLAY B.
001700 DISPLAY D.
After Changes :
Code:
001200 MOVE A TO B.
001300 ADD B TO D.
001400 ADD A TO D. -----> NEW LINE
001500 SUB 10 FROM D.
001600 DISPLAY A.
001700 DISPLAY B.
001800 DISPLAY D.
The line numbers after the inserted line gets automatically incremented.
I wanted it this way :
Code:
001200 MOVE A TO B.
001300 ADD B TO D.
001300 ADD A TO D. -----> NEW LINE
001400 SUB 10 FROM D.
001500 DISPLAY A.
001600 DISPLAY B.
001700 DISPLAY D.
I was just wondering if we have any other command that I might have
used accidently thats resulting in AUTONUM OFF not working properly.
Please suggest.
Thanks and Regards,
Raveendra. |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Tue Apr 04, 2006 9:15 am Post subject: |
|
|
If all you want to do is be able to compare old and new, you can set up SuperC to just compare between columns 7 and 72 by using the CMPCOLM. This macro does that when it front-ends the editor's built in COMPARE command:
Code: | /* Rexx - compare with sysin - compare only cols 1 thru 72 */
/* except type COBOL which is 7 thru 72 */
/* or specify ?col1:col2 (ex: dsn?2:80) */
Address isredit
'macro (parms)'
'(DSN) = dataset'
Parse Value reverse(dsn) With qual '.' .
If reverse(qual)='COBOL' Then cc = '7:72'
Else cc='1:72'
Address tso
Parse Var parms parms'?'col1':'col2
Do queued(); Pull; End
Address tso
'ALLOC F(SYSIN) REUSE DA(TEMPPLIB) DSO(PS) NEW DEL ',
'SPACE(1,1) TRACK UNIT(SYSDA) LRECL(80) RECFM(F B)'
If col2\='' & ,
datatype(col1,'N') = 1 & ,
datatype(col2,'N') = 1 Then
cc=col1':'col2
Push 'CMPCOLM 'cc
'EXECIO 1 DISKW SYSIN (FINIS'
Do queued(); Pull; End
Address isredit "BUILTIN COMPARE "parms" SYSIN"
If rc>7 then Address ispexec 'SETMSG MSG(ISRZ002)'
'FREE F(SYSIN)' |
|
|
Back to top |
|
 |
raveendra_ibm Beginner
Joined: 02 Apr 2006 Posts: 32 Topics: 10
|
Posted: Sat Apr 08, 2006 9:57 am Post subject: |
|
|
Hi All !!
I am not trying to remove the numbers all together. I am just trying to ensure that they are not incremented.
Hi Phantom ! I was trying to prevent auto increment of line numbers 1-6, but not removing them all together.
Could you please look into this.
Thanks semigeezer for your sample code.
Thanks and Regards,
Raveendra. |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Sun Apr 09, 2006 2:15 am Post subject: |
|
|
To prevent increment, use the NUM OFF command. The editor has a pretty good help system (press F1 while in the editor). |
|
Back to top |
|
 |
|
|