1.Functional Description
1.1Purpose
This funtion will retrieve the Dates within a fiscal date pattern, starting with the set that is 
greater than a begin date passed in and loading all periods after that into a Link List.
1.2Setup Notes and Prerequisites
 
1.3Special Logic
 If the begin date is less than the date the fiscal year begins for the date pattern record a '1' 
will be returned in the error code
 If no date pattern records are found for the date pattern passed in a '2' will be returned in the 
error code
2.Technical Specifications
1.If the MonthlyVsWeekly flag is not set do SETLL to the fiscal date pattern file (F0008) 
with the DatePattern and the BeginDate.
 Else
 SETLL to the fiscal date pattern - 52 period file (F0008B) with the DatePattern and the 
beginDate.
 End
2.Read all records in the file (either F0008 or F0008B) using the DatePattern as the key
If a DatePattern is found
 If ProgramID is equal to 'EP3465' or 'EP3461'
 -  Do the following until a date pattern is found that the begin date fits in
 Place the date pattern record in an array of 52 positions that are each 6 digits
 Find  the last non zero date of the fiscal date pattern in the array (this could be the 14th 
 or 
 the 52nd bucket) Use that date as the LastDate.  Use the Date Fiscal Year Begins (CDDFYJ)
 from the record as the StartDate.  
 If the BeginDate is greater than or equal to the StartDate 
 And Less then or equal to the LastDate. 
 Load the dates for the date pattern record to a Link List. As each data is added
to the LinkList verify that it is not the same as the date added just before it
 Else 
  If the BeginDate is less than the StartDate.
 Move a '1' to DatePatternError
 Get out of the program
 Else
 Read the next record from the file with the date pattern.
 End
 End
 End
 Once the above date conditions are satisfied or the function is called from EP34650, continue 
to read from the file by date pattern adding the dates from the date pattern record after those 
already in the 
 Link List.  As each data is added to the LinkList verify that it is not the same as the date 
added just before it
Else
 Move a '2' to DatePatternError
 End the program
End
3.If the first position in the date pattern Link List is zero move the BeginDate there
Return the Pointer to the Link List in PointerToDates 
D3400730 - BuildDatePatternLinkList
| Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both | 
|---|---|---|---|---|
| jdBeginDate | DRQJ | JDEDATE | NONE | NONE | 
The date that an item is scheduled to arrive or that an action is scheduled for completion.  | ||||
| cMonthlyVsWeekly | EV01 | char | NONE | NONE | 
An option that specifies the type of processing for an event.  | ||||
| cDatePattern | DTPN | char | NONE | NONE | 
A code that identifies date patterns. You can use one of 15 codes. You must set up special codes (letters A through N) for 4-4-5, 13-period 
  | ||||
| cDatePatternError | ERR | char | NONE | NONE | 
The Data Field Error Code field is simply a generic data field to pass an error condition flag.  This field is one of the fields that make up the 
  | ||||
| idPointerToDates | GENLNG | ID | NONE | NONE | 
General purpose ID variable.  | ||||
| szProgramID | PID | char | NONE | NONE | 
The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
  | ||||
| None | 
| F0008 Date Fiscal Patterns | ||||
| F0008B Date Fiscal Patterns - 52 Period Accounting |