Since the first field has increased in size to 5 from 4, then on the PARSE statement, you will need to change the +4 to +5:
OLD: PARSE VAR DATA.A CLUB +4 ITEM +6 PCT +3 . New: PARSE VAR DATA.A CLUB +5 ITEM +6 PCT +3 . Al Nims Systems Admin/Programmer 3 Information Technology University of Florida (352) 273-1298 -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Ron Thomas Sent: Tuesday, September 23, 2014 6:09 PM To: [email protected] Subject: Rexx Code Hello Below is the existing structure of the copybook 01 WRKFL2-REC. 03 WF2-CL PIC 9(4) COMP-3. 03 WF2-IT13 PIC X(6). 03 WF2-PERCWS PIC S999V9 COMP-3. Modified one is 01 WRKFL2-REC. 03 WF2-CL PIC 9(5) COMP-3. 03 WF2-IT13 PIC X(6). 03 WF2-PERCWS PIC S999V9 COMP-3. This structure is read by a Rexx program , here in the parse do we need to make any changes ? DO A = 1 TO DATA.0 PARSE VAR DATA.A CLUB +4 ITEM +6 PCT +3 . IF SYMBOL('INFO.ITEM.1') \= 'VAR' THEN DO INFO.ITEM.1=0 INFO.ITEM.2=0 ITEMPTR = ITEMPTR + 1 LIST.ITEMPTR = ITEM END PARSE VALUE C2X(PCT) WITH PCT +5 SIGN IF SIGN = 'D' THEN PCT = PCT * -1 ELSE PCT = PCT + 0 INFO.ITEM.1 = INFO.ITEM.1 + PCT INFO.ITEM.2 = INFO.ITEM.2 + 1 END Thanks Ron T ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
