View previous topic :: View next topic
|
Author |
Message |
Mathiv Anan
Active User
Joined: 23 Jul 2008 Posts: 106 Location: USA
|
|
|
|
Hi,
In Cobol program we generate sequence numbers from pos 1 to 6 using the command 'num on std cob' as below. (Our shop uses Endevor)
Code: |
000010 000010 ID DIVISION.
000020 000020 PROGRAM-ID. XXXXXXXX.
000030 000030 AUTHOR. YYYYY YYYYYY.
000040 000040 INSTALLATION. ZZZZ.
000050 000050 DATE-COMPILED.
|
But this is in the order of 10 incremented by 10.
Is there any way we can generate the sequence numbers from 1 incremented by 1 as follows.
Code: |
000010 000001 ID DIVISION.
000020 000002 PROGRAM-ID. XXXXXXXX.
000030 000003 AUTHOR. YYYYY YYYYYY.
000040 000004 INSTALLATION. ZZZZ.
000050 000005 DATE-COMPILED.
|
Please let me know if my query is not that clear.
Thanks |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
used to be, RENUM .zf .zl 1 1 (or something like that, you will have to look it up, I am too lazy and always use num off.)
PF1 while in EDIT Session, look for RENUM for correct syntax
depending upon the IMACRO you are using, (or forced to use), the program maybe renumbered - according to site standards - upon save.
why do you want the numbering to be incremented by 1????????
especially since newer (since 1980) systems don't use the sequence number anyway. |
|
Back to top |
|
|
santosh.ambaprasad
New User
Joined: 08 Mar 2009 Posts: 16 Location: London
|
|
|
|
Hi
I have no cue why this numbers are to be incremented by 1.
But ... yes there is a solution... using DFSORT
try this..
//STEP01 EXEC PGM=SORT
//SORTIN DD DSN=CBLPROG,DISP=SHR
//SORTOUT DD DSN=CBLPROG.UPD,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSIN DD *
INREC FIELDS=(SEQNUM,6,ZD,X,8,73)
SORT FIELDS=COPY
SORTIN is where your current cobol program should sit.
I assume you are writing cobol p0ogram in a file of LRECL 80. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
What happens to statements that are not blank in col 7? |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Quote: |
especially since newer (since 1980) systems don't use the sequence number anyway. |
But what if I drop my deck of cards? |
|
Back to top |
|
|
Mathiv Anan
Active User
Joined: 23 Jul 2008 Posts: 106 Location: USA
|
|
|
|
ok I will try with RENUM options.
Thanks |
|
Back to top |
|
|
|