I am trying to create a new distributed file. I am on a Linux Red Hat version 7 running universe 11.3.5 I tried running this command
DEFINE.DF DATA CSA.TRIPPER.CENSUS ADDING CTC1 1 CTC2 2 CTC3 3 CTC4 4 CTC5 5 INTERNAL PARTNO
Unable to open DICT "".
CSA.TRIPPER.CENSUS is a type 18 file that has existing data.
I created the CTC1 - 5 files all type 18
the PARTNO is in the DICT of CSA.TRIPPER.CENSUS
0001: I
0002: MOD(SEQ(@ID[LEN(@ID),1]),5)+1
0003:
0004: Partno
0005: 6R
0006: S
When I list CSA.TRIPPER.CENSUS PARTNO the part number is listing 1 through 5
1276225 4
1730044 3
2032590 4
2183863 2
2637682 1
2940228 2
3091501 5
3394047 1
What am I doing wrong?
Jon Card
Combined Transport
Hi Jon,
A distributed file is actually a file without any data which simply points to the part files which contain the actual data. Based on your update, I think you would want to create a new distributed file with your defined partitioning algorithm and then add the 5 part files. If you want the data in the CSA.TRIPPER.CENSUS file to be distributed across those 5 part files, you could copy the data from CSA.TRIPPER.CENSUS into the distributed file once it had been set up. Hope that makes sense.
Thanks,
Neil
I am trying to create a new distributed file. I am on a Linux Red Hat version 7 running universe 11.3.5 I tried running this command
DEFINE.DF DATA CSA.TRIPPER.CENSUS ADDING CTC1 1 CTC2 2 CTC3 3 CTC4 4 CTC5 5 INTERNAL PARTNO
Unable to open DICT "".
CSA.TRIPPER.CENSUS is a type 18 file that has existing data.
I created the CTC1 - 5 files all type 18
the PARTNO is in the DICT of CSA.TRIPPER.CENSUS
0001: I
0002: MOD(SEQ(@ID[LEN(@ID),1]),5)+1
0003:
0004: Partno
0005: 6R
0006: S
When I list CSA.TRIPPER.CENSUS PARTNO the part number is listing 1 through 5
1276225 4
1730044 3
2032590 4
2183863 2
2637682 1
2940228 2
3091501 5
3394047 1
What am I doing wrong?
Jon Card
Combined Transport
Hi John,
The way that I would put it is that a distributed file is a LOGICAL file that is made up of multiple PHYSICAL files. In this case, your distributed file name already exists as a physical file - so that causes one problem. The other is the dictionary side of things.
The UniVerse implementation of distributed files is awkward as the DEFINE.DF command creates a new dictionary by default - and then if you remove all the part files it DELETES the dictionary - which is really awkward if you have all your dictionary definitions in there.
I would start by making a multi-file structure with your CTCn files, and have them share a dictionary:
CREATE.FILE DICT CTC 7,4,18
CREATE.FILE DATA CTC,CTC1 97,4,18
CREATE.FILE DATA CTC,CTC2 97,4,18 etc
and create Q-pointers to the data portions of the CTCn files:
CTC1
001 Q
002
003 CTC,CTC1
Now, copy all your data into the CTC files, and set up the dictionary (copy the dictionary from your existing CSA.TRIPPER.CENSUS file). And then delete your old CSA.TRIPPER.CENSUS file. Note that you will need to selectively copy each data set to the part files because the system doesn't know anything about the partitioning algorithm at this point. In PICK flavour, this would be:
SELECT CSA.TRIPPER.CENSUS WITH PARTNO EQ "1"
COPY CSA.TRIPPER.CENSUS
To: (CTC1
Now, create a file pointer for the new distributed file that points to your shared dictionary:
CSA.TRIPPER.CENSUS
001 F
002
003 ./D_CTC
Note the RELATIVE reference to the dictionary. This is so that UV will prompt you before deleting the dictionary (if you ever remove all the distributed part files).
Now, create your distributed file:
DEFINE.DF CSA.TRIPPER.CENSUS ADDING CTC1 1 INTERNAL PARTNO
Hopefully, that will work. Assuming that is OK, then add the remaining parts.
The issue with INTERNAL algorithms is that the dictionary needs to exist before the distributed file.
I hope that helps.
Cheers,
Brian
I am trying to create a new distributed file. I am on a Linux Red Hat version 7 running universe 11.3.5 I tried running this command
DEFINE.DF DATA CSA.TRIPPER.CENSUS ADDING CTC1 1 CTC2 2 CTC3 3 CTC4 4 CTC5 5 INTERNAL PARTNO
Unable to open DICT "".
CSA.TRIPPER.CENSUS is a type 18 file that has existing data.
I created the CTC1 - 5 files all type 18
the PARTNO is in the DICT of CSA.TRIPPER.CENSUS
0001: I
0002: MOD(SEQ(@ID[LEN(@ID),1]),5)+1
0003:
0004: Partno
0005: 6R
0006: S
When I list CSA.TRIPPER.CENSUS PARTNO the part number is listing 1 through 5
1276225 4
1730044 3
2032590 4
2183863 2
2637682 1
2940228 2
3091501 5
3394047 1
What am I doing wrong?
Jon Card
Combined Transport
working with Neil I was able to add the file
I created files CTC1 through 5 as type 18
I added PARTNO to the VOC
DEFINE.DF DATA CSA.CENSUS ADDING CTC1 1 CTC2 2 CTC3 3 CTC4 4 CTC5 5 INTERNAL PARTNO
Creating file "D_CSA.CENSUS" as Type 30.
Added "@ID", the default record for RetrieVe, to "D_CSA.CENSUS".
Compiling "@PART.ALGORITHM".
MOD ( SEQ ( @ID [ LEN ( @ID ) , 1 ] ) , 5 ) + 1
Part file "CTC1", Path "/u2/COMBINED/TK.JR/CTC1", Part number 1 Added.
Part file "CTC2", Path "/u2/COMBINED/TK.JR/CTC2", Part number 2 Added.
Part file "CTC3", Path "/u2/COMBINED/TK.JR/CTC3", Part number 3 Added.
Part file "CTC4", Path "/u2/COMBINED/TK.JR/CTC4", Part number 4 Added.
Part file "CTC5", Path "/u2/COMBINED/TK.JR/CTC5", Part number 5 Added.
I then copied the data from CSA.TRIPPER.CENSUS to CSA.CENSUS
Then copied the DICT from CSA.TRIPPER.CENSUS to CSA.CENSUS
and it looks like I am good to go
Jon Card
Combined Transport