How to use string in array of structures

I need small help related to system Verilog construct

I want to modify ( print,delete,add) different field of RAL model, for that I have defined structure of fields and then using array of structures, i want to access individual fields

typedef struct { 
//   string reg_name;
   bit[7:0] a;
   bit[31:0] b; 
   bit[31:0] c; 
   bit[31:0] d
  } my_data_struct; 

   my_data_struct[0:43] a = {{"Sachin",32'h00000000,32'hffffffff,32'h00000000}
                             {"Joe",32'h00000000,32'hffffffff,32'h00000000} };

For other datatypes other than string , it is working fine , but when I am using string … I am getting following error

** Error: Field ‘reg_name’ in packed struct is not packed.
** Error: Cannot create a packed array from unpacked elements
When I use bit[7:0] instead of string , I am not getting full message…

Please let me know other way to get string information from array of structure…

Thanks in advance for your help…

Regards
Sachin Jain

SystemVerilog IEEE 1800-2012

7.2 When a packed dimension is used with the struct or union keyword, the packed keyword shall also be used.

In a packed struct or union, each member must have an “integral” data type as defined in the SystemVerilog LRM. Examples of non-integral data types are classes, unpacked arrays (strings), unpacked structures and so on.

If you really want to use string in a packed struct, I think you have to use something like that:

typedef struct packed { 
bit [1:9][7:0] reg_name;
bit[7:0] a;
bit[31:0] b; 
bit[31:0] c; 
bit[31:0] d
} my_data_struct;
my_data_struct a

And to show the string you can use cast:

$display(string'(a.reg_name))

But, definitely I don’t know if this solution is efficient.

In reply to SachinJain:

You need to be clearer, this does not make much sense. Even if you changed the string to a bit [7:0] (or byte) the struct is unpacked and you should have gotten an error trying create an packed array on an unpacked struct. Did you mean to declare the struct packed? Or did you mean to define the array a as an unpacked array (my_data_struct a[0:43];)

Also, do these string names really need to be a part of the RAL structure? You could define a separate data item like an enum or associative array
enum way:

typedef enum {Sachin, Joe,...} data_names_e;

array way

int data_names[string] = '{"Satchin":0,"Joe":1,...};

It might help to show examples of how you plan to use this information.