[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

[sqr-users] SQR Conversion of ASCII value to ASCII character




SQR for PeopleSoft/8.16.02/PC/Windows NT 4.0/Oracle 8.0.6 

I am calculating a check code (for Bar-Coding) which is then converted to an 
ASCII character 
using chr() and appended to an emplid. I then write the Employee ID to a flat 
file.  For ASCII 
values above 193, the check digit always shows up as a blank, lower ASCII 
values store correctly.  

Thanks in advance for any ideas.


                         Expected    
ASCII Value     ASCII Character      

193                           Á
194                           Â
195                           Ã
196                           Ä
197                           Å
198                          Æ
199                           Ç
200                           È
201                           É
202                           Ê
203                           Ë
204                           Ì
205                           Í
206                           Î
 

!------------------------------------------------------------------------------------
! Procedure: CALCULATE-CHECK-CODE                                      
! Descr:     Calculates and appends check digit to Employee ID  
!------------------------------------------------------------------------------------
begin-procedure CALCULATE-CHECK-CODE

   !$CheckDigit is determined in another procedure.
   let $CheckCode = chr($CheckDigit)          

   let $emplid = $emplid || $CheckCode 
   
   Show 'Employee Id/ Check Digit'  $emplid  $CheckDigit
   DO WRITE-ACTIVE-EMPLOYEES

end-procedure

!------------------------------------------------------------------------------------
! Procedure: WRITE-ACTIVE-EMPLOYEES                                    
! Descr:     Writes SSN, emplid/check code to a flat file               
!------------------------------------------------------------------------------------
begin-procedure WRITE-ACTIVE-EMPLOYEES 

   WRITE 1 FROM $ssn:9,
                     $emplid:9
                           
end-procedure
!------------------------------------------------------------------------------------


_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users