Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ASUUY2K

ASUUY2K.m

Go to the documentation of this file.
  1. ASUUY2K ; IHS/ITSC/LMH -Y2K COMPLIENT RTN ;
  1. ;;4.2T2;Supply Accounting Mgmt. System;;JUN 30, 2000
  1. START(A,B,C,D) ;EP
  1. ;;4.2T1;SUPPLY ACCOUNTING MGMT SYSTEM;;JAN 28, 2000
  1. ;11/16/98 WAR - This routine is designed to create a Fileman date
  1. ; from either a 4 digit date (YYMM or MMYY) or a 6
  1. ; digit date (MMDDYY or YYMMDD).
  1. ;5/14/99 WAR - Due to Y2K compliance issues, "00" was imbedded in
  1. ; between the MMYY format to avoid FM problems with dates
  1. ; between 2000 and 2031
  1. ;
  1. ; A - Contains a numeric string or an array
  1. ; B - Number of piece, within array, if applicable
  1. ; C - Delimeter, if applicable
  1. ; D - Contains either 'Y' or 'N' (order to be set)
  1. ;
  1. ; NOTE: Incoming formats that need to be changed:
  1. ; YYMM or YYMMDD
  1. ;
  1. ;
  1. N X,Z ;X newed because of VA FM
  1. ;
  1. I +B>0 D ;if null, value is zero and no piece needed
  1. .S Z=$P(A,C,B)
  1. E D
  1. .S Z=A
  1. ;U IO(0) W !,"Z IS ->",Z
  1. I $L(Z)#2=0 D ;watching for even number char's
  1. .I D="Y" D ;fld needs to be put in correct order for VA FM
  1. ..I $L(Z)=6 D
  1. ...S Z=$E(Z,3,4)_$E(Z,5,6)_$E(Z,1,2) ;set to MMDDYY
  1. ..E I $L(4) D ;IHS/DSD/JLG 5/27/99
  1. ...S Z=$E(Z,3,4)_"00"_$E(Z,1,2) ;set to MM00YY
  1. .E D
  1. ..I $L(Z)=4 D
  1. ...S Z=$E(Z,1,2)_"00"_$E(Z,3,4) ;include 00
  1. S X=Z
  1. D ^%DT
  1. I Y=-1 S Y=X ;IHS/DSD/JLG 5/27/99 If X is null leave it
  1. I +B>0 D
  1. .S $P(A,C,B)=Y
  1. E D
  1. .S A=Y
  1. Q