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
 

 

any pointers on implementing linked list in cobol????

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Tue Sep 26, 2006 11:52 am    Post subject: any pointers on implementing linked list in cobol????
Reply with quote

hi

can anyone give me some sample codes to understand how to implement linked list or b-tree or b-list in cobol using pointers .....

thanks
Back to top
View user's profile Send private message

UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 743
Location: Germany

PostPosted: Tue Sep 26, 2006 4:53 pm    Post subject:
Reply with quote

Hi !

First i hope i understand you correctly. I think you wanna know something abaout using pointers in Cobol. Pointers are nothing else then adresses of areas. So the area could be filled with data fom another called programm without transfering the whole area from the calling-programm to the called-programm. You only transfer the adress of the area or the table by a pointer variable.

LINKAGE SECTION.

01 LINK-PARM-MDL00900.

05 LINK-MDL00900-PGMMODE PIC X(02).
05 LINK-MDL00900-PGMFUNK PIC X(02).
05 LINK-MDL00900-ADRESSE POINTER.
05 LINK-MDL00900-KONTONR PIC X(06).
05 LINK-MDL00900-KONTOKZ PIC X(03).
05 LINK-MDL00900-RETCODE PIC X(04).
05 LINK-MDL00900-RETMSGS PIC X(30).


PROCEDURE DIVISION USING LINK-PARM-MDL00900.

IF LINK-MDL00900-PGMMODE = '01'

SET ADDRESS OF ACCOUNT-TAB TO LINK-MDL00900-ADRESSE

....then fill the account-tab with needed data
.....and return to the calling programm

END-IF


If tis is what you want, please read more in the cobol-manual about using pointers.

Regards, UmeySan
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Sep 26, 2006 10:39 pm    Post subject: Re: any pointers on implementing linked list in cobol????
Reply with quote

ashimer,

To start with, what is your understanding of linked-lists? Do you understand the structure? And are you interested in implementing a forward linked list or a bi-directional (forward and backward) linked list?

Dave
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm


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