Gen External Action Block (EAB) 'C' file naming convention algorithm
search cancel

Gen External Action Block (EAB) 'C' file naming convention algorithm

book

Article ID: 233228

calendar_today

Updated On:

Products

Gen

Issue/Introduction

Regarding External Action Blocks (EABs) generated as 'C' files, the 'C' files generated make use of generated field names based on the Gen field name with some modifications.  It makes use of only up to a certain length of the Gen field name and also appends a seemingly running number suffix.   

 What is the rule/algorithm being followed on how this number suffix is assigned and when does it change?
What type of modifications within a Gen EABs will trigger a change in the name/numbering when 'C' file is generated? 

Environment

Release: 8.6

Component: Gen Generators 

Resolution

The reasoning behind the naming algorithm is related to COBOL limitations, and it appears the same naming algorithm was used by the Gen 'C' generator.
 
In general each new entity/workset view gets its uniqueness number incremented.  The attributes within each entity/workset view normally use the same uniqueness number as the entity/workset view itself.  The exception to this rule is if the attribute name is greater than 22 characters, then the uniqueness number is incremented again.  This is done because it has to truncate the attribute name once it is greater than 22 characters in order to leave room for the -9999XX suffix.  Because truncation of the attribute name is occurring, the uniqueness number is incremented again to make sure the attribute names are unique within the entity/workset view.
 
So if  new entity/workset view is added , then the expectation would be that all views after the new view would be renumbered.  But if a new attribute is added to an existing entity/workset view and the new attribute name is 22 characters or less, then it is not the case that the following views to be renumbered.
 
Sample Gen 'C' generation test performed, the IEF_SUPPLIED Work Set is used as an Import and Export to an EAB.  The following code was generated:
 
/* * * * * * * * * * * * * * * * * * * * */
/* START OF IMPORT VIEWS */
/* * * * * * * * * * * * * * * * * * * * */
struct w_ioa_0174063720_000
{
struct
{
/* Entity View: IMPORT */
/*        Type: IEF_SUPPLIED */
char select_char_001as;
char select_char_001[2] /* 1 + 1 */;
char action_entry_001as;
char action_entry_001[3] /* 2 + 1 */;
char command_001as;
char command_001[81] /* 80 + 1 */;
char count_001as;
long count_001;
char total_real_001as;
double total_real_001;
char total_currency_001as;
double total_currency_001;
char total_integer_001as;
double total_integer_001;
char percentage_001as;
short percentage_001;
char average_real_001as;
double average_real_001;
char average_currency_001as;
double average_currency_001;
char average_integer_001as;
long average_integer_001;
char flag_001as;
char flag_001[2] /* 1 + 1 */;
char subscript_001as;
long subscript_001;
} l000l01;
};

 

static struct w_ioa_0174063720_000  *a_0174063720_ioa;

 

/* * * * * * * * * * * * * * * * * * * * */
/* START OF EXPORT VIEWS */
/* * * * * * * * * * * * * * * * * * * * */
struct w_ioa_0174063721_001
{
struct
{
/* Entity View: EXPORT */
/*        Type: IEF_SUPPLIED */
char select_char_002as;
char select_char_002[2] /* 1 + 1 */;
char action_entry_002as;
char action_entry_002[3] /* 2 + 1 */;
char command_002as;
char command_002[81] /* 80 + 1 */;
char count_002as;
long count_002;
char total_real_002as;
double total_real_002;
char total_currency_002as;
double total_currency_002;
char total_integer_002as;
double total_integer_002;
char percentage_002as;
short percentage_002;
char average_real_002as;
double average_real_002;
char average_currency_002as;
double average_currency_002;
char average_integer_002as;
long average_integer_002;
char flag_002as;
char flag_002[2] /* 1 + 1 */;
char subscript_002as;
long subscript_002;
} l001l01;
};

 

static struct w_ioa_0174063721_001  *a_0174063721_ioa;
 
Notice that all the attributes in the IEF_SUPPLIED Work Set use the same uniqueness number (i.e., 001 in the Import View and 002 in the Export View).
 
Then modified the AVERAGE_CURRENCY attribute to have a longer name (AVERAGE_CURRENCY7890123) so that its name was 23 characters in length and the following code was generated:
 
/* * * * * * * * * * * * * * * * * * * * */
/* START OF IMPORT VIEWS */
/* * * * * * * * * * * * * * * * * * * * */
struct w_ioa_0174063720_000
{
struct
{
/* Entity View: IMPORT */
/*        Type: IEF_SUPPLIED */
char select_char_001as;
char select_char_001[2] /* 1 + 1 */;
char action_entry_001as;
char action_entry_001[3] /* 2 + 1 */;
char command_001as;
char command_001[81] /* 80 + 1 */;
char count_001as;
long count_001;
char total_real_001as;
double total_real_001;
char total_currency_001as;
double total_currency_001;
char total_integer_001as;
double total_integer_001;
char percentage_001as;
short percentage_001;
char average_real_001as;
double average_real_001;
char average_currency7890123_002as;
double average_currency7890123_002;
char average_integer_002as;
long average_integer_002;
char flag_002as;
char flag_002[2] /* 1 + 1 */;
char subscript_002as;
long subscript_002;
} l000l01;
};

 

static struct w_ioa_0174063720_000  *a_0174063720_ioa;

 

/* * * * * * * * * * * * * * * * * * * * */
/* START OF EXPORT VIEWS */
/* * * * * * * * * * * * * * * * * * * * */
struct w_ioa_0174063721_001
{
struct
{
/* Entity View: EXPORT */
/*        Type: IEF_SUPPLIED */
char select_char_003as;
char select_char_003[2] /* 1 + 1 */;
char action_entry_003as;
char action_entry_003[3] /* 2 + 1 */;
char command_003as;
char command_003[81] /* 80 + 1 */;
char count_003as;
long count_003;
char total_real_003as;
double total_real_003;
char total_currency_003as;
double total_currency_003;
char total_integer_003as;
double total_integer_003;
char percentage_003as;
short percentage_003;
char average_real_003as;
double average_real_003;
char average_currency7890123_004as;
double average_currency7890123_004;
char average_integer_004as;
long average_integer_004;
char flag_004as;
char flag_004[2] /* 1 + 1 */;
char subscript_004as;
long subscript_004;
} l001l01;
};

 

static struct w_ioa_0174063721_001  *a_0174063721_ioa;
 
Notice that the uniqueness number gets incremented when the AVERAGE_CURRENCY7890123 attribute is generated (i.e. 002 in the Import View and 004 in the Export View) even though it is part of the IEF_SUPPLIED Work Set.