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
 

 

How to define and use a Code-Table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IDMS/ADSO
View previous topic :: :: View next topic  
Author Message
bharat_juneja

New User


Joined: 21 Dec 2005
Posts: 20
Location: US

PostPosted: Sat Apr 29, 2006 2:33 am    Post subject: How to define and use a Code-Table
Reply with quote

Hi,
I want to define a code-table wherein I want to pass the value for a field that I am getting from the database and display the corresponding field on the screen.

Please help with the steps to achieve this.

Thanks,
Bharat
Back to top
View user's profile Send private message

Pjoe

New User


Joined: 22 Jul 2005
Posts: 17

PostPosted: Mon May 08, 2006 10:39 am    Post subject: Re: How to define and use a Code-Table
Reply with quote

Hi,
You can define the code table using the IDDM .
In the first screen press PF9
Next screen select code table and add the table.
Using the option CVAL = CODE TABLE VALUES you can specify the values
ENCODE VALUE.: JOE
DECODE VALUE.: JANUARY

ENCODE VALUE.: JIM
DECODE VALUE.: FEBRUARY

here in encode value give the database value
and decode value give display value

Attatch the code table to the display field in the map. you can do this thru mapc.


HTH
-Joe
Back to top
View user's profile Send private message
bharat_juneja

New User


Joined: 21 Dec 2005
Posts: 20
Location: US

PostPosted: Tue May 09, 2006 12:56 am    Post subject: Re: How to define and use a Code-Table
Reply with quote

Thanks Joe.
That helped.
Back to top
View user's profile Send private message
bharat_juneja

New User


Joined: 21 Dec 2005
Posts: 20
Location: US

PostPosted: Tue Jun 06, 2006 10:23 pm    Post subject: Re: How to define and use a Code-Table
Reply with quote

I more small problem in Code Table:
I have 3 fields defined in a group:
01 Type-desc
02 Type x(2)
02 Dash x(1)
02 Description x(10)

This Type-desc is a MAP field.
Now, I want to use code-table for field "Description". I want to pass type into it and it should pick the corresponding desc from code-table. Is there any way out?
I have already defined it to map Or that I have to remove everything (the whole array of which it is a part) from map and then changes to map-rec and all that re-work. I don't wanna do that neither I want to code lots off IF-ELSE.

Thanks for your assistance.
Bharat
Back to top
View user's profile Send private message
bharat_juneja

New User


Joined: 21 Dec 2005
Posts: 20
Location: US

PostPosted: Tue Jun 06, 2006 10:23 pm    Post subject: Re: How to define and use a Code-Table
Reply with quote

I more small problem in Code Table:
I have 3 fields defined in a group:
01 Type-desc
02 Type x(2)
02 Dash x(1)
02 Description x(10)

This Type-desc is a MAP field.
Now, I want to use code-table for field "Description". I want to pass type into it and it should pick the corresponding desc from code-table. Is there any way out?
I have already defined it to map Or that I have to remove everything (the whole array of which it is a part) from map and then changes to map-rec and all that re-work. I don't wanna do that neither I want to code lots off IF-ELSE.

Thanks for your assistance.
Bharat
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 -> IDMS/ADSO All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm


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