IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to define and use a Code-Table


IBM Mainframe Forums -> IDMS/ADSO
Post new topic   Reply to topic
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
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IDMS/ADSO

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
Search our Forums:

Back to Top