SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Strategies & Market Trends : TA-Quotes Plus

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: Sean W. Smith who wrote (6091)8/21/1998 10:20:00 PM
From: Gary Lyben  Read Replies (1) of 11149
 
The master record contains the last 4 dividend actions.

All you have to do is read the master record for each symbol and dump the dividend records.

This code is from the main.cpp example

void PrintDividends( char *sym )
{
int erc , j ;

usr_master_def master;

memset( &master, 0, sizeof( usr_master_def ) );
erc = R2_Open_Files( MASTER_FILE , dirbuff );//open the master file

if ( erc != 0 )//if this is true then there was an error
{
printf( "Error code %d received on open master file\n" , erc );
return;
}

//read the master and put the output into the master struct

erc = R2_QP_ReadMaster( QP_EQUAL , QP_SYMBOL, sym, &master );

if ( erc == 0 )//Zero on the previous call means it was successful
{

printf( "\nDividends for %s \n" , sym );

for ( j=0 ; j<4 ; j++ )
{
printf( "Payable date %02d/%02d/%04d Amount %10.4f Type %c%c\n" ,
master.divs[j].Pay_date.month ,
master.divs[j].Pay_date.day ,
master.divs[j].Pay_date.year ,
master.divs[j].rate ,
master.divs[j].flag[0] ,
master.divs[j].flag[1] );
}
}

R2_Close_Files( MASTER_FILE );//close the master file

}

You would have to expand the date print code for each date:

Ex_date; Ex distribution date
Rec_date; Record date
Pay_date; Payable date
Ann_date; Announcement date

Gary

Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext