Author: Dale Sahlberg- 1 -
3270 – DATA VACUUM CLEANER
Review the data in the following fields - anything amiss?
DIAGNOSIS: Headache & fever
PT LAST NAME: St. John
PT FIRST NAME: Jo Ann
SOC SEC#: 065349678
CITY: _Tampa
GUAR NAME: O’Malley
What choice below was your thought?
A)Data looks good to me – give that user a raise!
B)The “Headache & fever” diagnosis should have a + instead of that thingy which looks like some kinda musical symbol
C)Need to spell out: Saint John
D)CITY should not have a leading space in front of Tampa
E)I think I am getting an interface headache.
Do these interface messages create a “bad hair day” for you?
TYPE TIME |---+----1----+----2----+----3----+----4----+----5----+----6--
G 08:42:21 ARKI20033: (A5Z0L2), TRANSACTION SKIPPED DURING ERROR PROCESSING
TYPE TIME |---+----1----+----2----+----3----+----4----+----5----+----6--
G 08:04:21 ARKE20016: (J5X0S2), UNIDENTIFIABLE RTRNFILE TRANSACTION
Special characters ('.','@','#','$','%','&','*','-','+','|') in a field can wreak havoc on interfaces and cause database problems.
Would it be nice to have a way to detect special characters in a field … then issue a message right away for the user to correct the data in that field?
Well – there is good news !!!
Step right up to the new: DATA VACUUM CLEANER
This nifty data vacuum cleaner can:
- Find all the junk in your data carpet (symbols)
- Flash a nice warning when it finds clutter
- Keep working until the whole field is vacuumed clean
- Be easily carried to any place in the hospital system ( PA, PM, COR, RESULTS )
HOW TO GET YOUR OWN 3270 DATA VACUUM CLEANER
A) Create the tcl - $T = INDEX
---- ASSIGN DATA VALUES ----
"C0733"='1'
"C0740"=1
STACK COMMAND DEFINITION - CONDITIONAL
WHERE ALL OF "C0731" IS VALUED
AND "%SCRNAME" IS VALUED
THEN "PCALCID"='INDEX',
$PE=PCALCID,
$P=CHPPDVAL
B) Program a new member "INDEX" into PRALC -
Member = INDEX
ENTER EXPRESSION(S) -
"C0733" = MID("C0731","C0740",1);
$T=INDEX2;
C) Build this tcl - $T = INDEX2
STACK COMMAND DEFINITION - CONDITIONAL
WHERE ALL OF "C0733" IS VALUED
AND "C0733" IN ('.','@','#','$','%','&','*','-','+','|')
THEN $MSG=H0001994,
$SA=%SCRNAME
ELSE
WHERE ALL OF "C0740" IS VALUED
AND "C0740" LT 61
THEN "C0740"="C0740" + 00001,
"PCALCID"='INDEX',
$PE=PCALCID,
$P=CHPPDVAL
Define in the list the special characters you want to check for:
WHERE "C0733" IN ('.','@','#','$','%','&','*','-','+','|')
D) Construct a master control tcl –
$T = master pick your own name … example: $T = CHKADDR
---- ASSIGN DATA VALUES ----
"C0731"="0PTADDXB"
"%SCRNAME"='ZPREGS01'
Insert whatever field you want to check in this line of code:
"C0731" = "0PTADDXB" "0PTADDXB" – the variable field (pt last name)
Key the name of your screen here:
"%SCRNAME" = 'ZPREGS01' screen name
E) Create a LINE 24 $MSG = H0001994 message to inform users they need to remove the bad character in the field.
Message: H0001994 Use only letters and numbers. Please correct the data.
F) Put in the stack command of your screen the following code; this will return to the screen at that field and display a message -
WHERE "C0733" IS VALUED
THEN "%CUSRFLD"='0PTADDXB', cursor stops in this field
$D=C0733,
$P=CHPPCUSR,
$MSG=H0101994,
$S=scrname insert your screen name
Now there is a way to detect bad characters in a field … then issue a message right away for the user to correct the data in that field.