Consultor Eletrônico



Kbase 15180: Unable to Convert C-ISAM Date to Progress Date (2325)
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   05/03/2002
Status: Unverified

FACT(s) (Environment):

Progress 6.3F

SYMPTOM(s):

Unable to convert C-ISAM date to PROGRESS date. (2325)

CHANGE:

In prior Progress versions (prior to Progress 6.3), Progress did not perform a check (verify) of data, thus all information (whatever the format), was allowed.

CAUSE:

Error is receieved when there is invalid data in date field.

FIX:

Run program, little.p, against a CISAM file to fix the incorrect data.  

/* Attached is date_fixup.p which you can run against a file that has
ASCII date fields.  The procedure will leave unchanged any fields
which have valid data, and assign the UNKNOWN value to fields which
have invalid data.

  Modify date_fixup.p as follows:
1) Substitute the name of the table in the FOR EACH <table-name>
  statement.
2) Subsitute the name of the ASCII date field in the ASSIGN
  <date-field> statement.
3) Repeat the ASSIGN and IF ERROR-STATUS statments for each ASCII
  date field in the table. */

After running date_fixup.p on each table with ASCII dates, you should have no more problems extracting ASCII date data from your tables.

/*
* date_fixup.p
*
* Repeat FOR EACH loop for each table with ASCII date field.
* Repeat ASSIGN...IF ERROR-STATUS:ERROR for each date field in table.
*/

FOR EACH <table-name>:
ASSIGN <date-field> = <date-field> + 0.  /* that's a zero */
IF ERROR-STATUS:ERROR THEN
ASSIGN <date-field> = ?.
END.