Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Line number from position 1 thru 6 in COBOL program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
Mathiv Anan

Active User


Joined: 23 Jul 2008
Posts: 106
Location: USA

PostPosted: Thu May 14, 2009 6:59 pm    Post subject: Line number from position 1 thru 6 in COBOL program
Reply with quote

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
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu May 14, 2009 7:12 pm    Post subject:
Reply with quote

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
View user's profile Send private message
santosh.ambaprasad

New User


Joined: 08 Mar 2009
Posts: 16
Location: London

PostPosted: Fri May 15, 2009 2:44 am    Post subject: Reply to: Line number from position 1 thru 6 in COBOL progr
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri May 15, 2009 4:31 am    Post subject:
Reply with quote

What happens to statements that are not blank in col 7?
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Fri May 15, 2009 8:43 am    Post subject:
Reply with quote

Quote:
especially since newer (since 1980) systems don't use the sequence number anyway.

But what if I drop my deck of cards? icon_lol.gif
Back to top
View user's profile Send private message
Mathiv Anan

Active User


Joined: 23 Jul 2008
Posts: 106
Location: USA

PostPosted: Fri May 15, 2009 8:49 am    Post subject:
Reply with quote

ok I will try with RENUM options.

Thanks
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts what is meaning of the number in dcl Martylin PL/I & Assembler 2 Thu Mar 09, 2017 7:18 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts GDG version number PANDU1 JCL & VSAM 4 Sat Mar 04, 2017 8:28 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us