Just a stab, FWIW
*       R8 ==> INCOMING FIELD
*       R9  =  INCOMING FIELD LENGTH
*       R10 ==> PL8 PACKED DECIMAL RESULT
*        R11  =  WORK - DIGIT COUNT
*        R12 ==> CL16 - WORK - SAVE DIGITS
INCMPACK DS    0H       INCOMING PACK
         SR    R11,R11  DIGIT COUNT
         LA    R12,IPWORK
IP010    DS    0H
         CLI   0(R8),C'0'  Q-DIGIT
         BL    IP020       N
         CLI   0(R8),C'9'  INSURANCE - NO CHARS > '9'
         BH    IP020
         MVC   0(1,R12),0(R8)  SAVE DIGIT
         LA    R11,1(,R11) DIGIT COUNT
         CH    R11,=H'16'  Q-TOO MANY DIGITS
         BNL   IP030       Y-HAVE ALL WE CAN HANDLE
         LA    R12,1(,R12) NEXT DIGIT SAVE AREA
IP020    DS    0H
         LA    R8,1(,R8)  NEXT INCOMING BYTE
         BCT   R9,IP010
IP030    DS    0H         
         BCTR  R11,R0     ADJUST FOR 'EX'
         EX    R11,IPPACK
*        PACK  0(8,R10),IPWORK(*-*)
*        R10 ==> PL16 PACKED DECIMAL 
*        TTD - EXIT INCOMING PACK ROUTINE, EG, B  CONTINUE ON
IPPACK   PACK  0(8,R10),IPWORK(*-*)
IPWORK   DS    CL16

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU]
On Behalf Of Greg Gray
Sent: Thursday, October 13, 2016 08:22
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: converting character to packed

I have character data in a field (ex. $13,501,298.01) and I need to remove
the special characters and convert field from char to packed?  Can someone
give a suggestion on the best and simplest way to do it, thanks?

Reply via email to