I-DESCRIPTOR

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Sunshine2323
Charter Member
Charter Member
Posts: 130
Joined: Mon Sep 06, 2004 3:05 am
Location: Dubai,UAE

I-DESCRIPTOR

Post by Sunshine2323 »

Hi All,

I need help creating a I-DESCRIPTOR field

Existing Metadata in Hash File is
Emp_id
Emp_name
Num


I want to create a field whose value is 10 times the Num field above

I tried creating this field as follows
1) REVISE DICT HASH_EMPLOYEES USING ENTER.DICT
2) FIELD - VALUE
LOCATION - NUM*10
CONV-
DISPLAY NAME-VALUE
FORMAT-
S/M-S
3) After this I get a message saying "Write attempt on read only file"
4) If I try compiling it gives no message

Its not creating the virtual field?
Please guide me in creating this field.

Thanks,
Warm Regards,
Amruta Bandekar

<b>If A equals success, then the formula is: A = X + Y + Z, X is work. Y is play. Z is keep your mouth shut. </b>
--Albert Einstein
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The format for your I-descriptor is :

1 - "I" {I-descriptor}
2 - Num*10 {formula}
3 - MD0 {conversion, here to masked decimal 0 }
4 - NumTimes10 {column header}
5 - 6R {display format}
6 - S {Single value}

I think that NUM won't work as it is a reserved word for a function.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Sunshine

Arnd is probably correct but it looks like this file is read only at the OS level. You need to fix that. I would also change the REVISE into ED.

Code: Select all

REVISE DICT HASH_EMPLOYEES USING ENTER.DICT 

ED DICT HASH_EMPLOYEES NumTimes10
If Num is field 2 then change Arnd's code into

Code: Select all

1 - "I"
2 - @RECORD<2>*10 
3 - MD0  
4 - NumTimes10
5 - 6R
6 - S
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

None of that will work until you are granted Write permission to the file dictionary of the hashed file. Contact your administrator.

BTW, "USING ENTER.DICT" is redundant, since this REVISE template is invoked automatically when the keyword DICT precedes the file name.

What are you trying to accomplish, and why?

You also need write permission to use EVAL with a RetrieVe query but - here's the good news - you don't need write permission to use EVAL with SQL. So you could

Code: Select all

SELECT *, NUM * 10 FROM HASH_EMPLOYEES;
or

Code: Select all

SELECT *, EVAL "NUM * 10" FROM HASH_EMPLOYEES;
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes it's an old post. However, wearing another hat, I have just re-worked this document which may assist anyone wanting to create I-descriptors (or other UniVerse file dictionary items) in the future. There's probably too much there for DataStage, but too much is probably better than not enough.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply