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,
I-DESCRIPTOR
Moderators: chulett, rschirm, roy
-
- Charter Member
- Posts: 130
- Joined: Mon Sep 06, 2004 3:05 am
- Location: Dubai,UAE
I-DESCRIPTOR
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
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
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.
If Num is field 2 then change Arnd's code into
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
Code: Select all
1 - "I"
2 - @RECORD<2>*10
3 - MD0
4 - NumTimes10
5 - 6R
6 - S
Mamu Kim
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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
or
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;
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.