« Ways to Create PDFs from 3000 Output | Main | Did Charon get to where HP could've gone? »

September 23, 2014

Pre-Migration Cleanup Techniques

Migrations are inevitable. The Yolo County Office of Education is on its way to a Windows-based system, after many years of HP 3000 reliance. Ernie Newton of the Information and Technology Services arm of the organization is moving his 3000 data. He's doing a clean-up, a great practice even if you're not heading off of MPE.

I am cleaning up our IMAGE databases for the inevitable move to Microsoft’s SQL Server. One thing I've encountered is that Suprtool does not like null characters where there should be numbers.

I know that I have invalid characters, (non-numeric), in a field called ITEM-NUMBER.  But when I try to find those records, Suprtool chokes and abruptly stops the search. Here's what I get...

IF ITEM-NUMBER < 0 OR ITEM-NUMBER > 9999
X

Error:  Illegal ascii digit encountered. Please check all data sources
Input record number: 1

Is there a way to run Suprtool to help it find these records? Query finds them just fine, but Query doesn't have to ability to do what I want to do. 

After being reminded that "Nulls are not numbers," by Olav Kappert, and "try to use a byte string to compare (like < "a" or > "z") or something like that," Robelle's Neil Armstrong weighed in.

You can find any character you want by using the Clean, $findclean and $clean feature. The first issue to deal with is to re-define the item-number as a byte type in order to use the function.

Armstrong explained, "The following shows how to find the fields with 'invalid' zoned-decimal characters. Remember that zoned fields use characters to indicate the sign. It's likely that you don't have negative Item numbers but they are valid.

get somedataset
def item-x,item-number,byte
{Setup what characters to look valid characters are 0-9, JKLMNOPQRST, ABCDEFGHI and the curly braces }
{ so Clean characters should be not the above }
clean "^0:^47","^58:^64","^85:^122","^126:^255"
if $findclean(item-x)
ext item-x
list st
xeq

"Note the clean command defines the 'decimal' characters to look for."

05:50 PM in Hidden Value, Migration | Permalink

Bookmark and Share

Use our search engine to find 20 years
of HP 3000 news and articles

Comments

Comments

The comments to this entry are closed.