I have a zoned decimal and an input with all numbers in it , My requirement is to read the input using a subroutine(without using XDECI and XDECO ).
PROTABLE DSECT
PRICE DS 4Z
MAIN CSECT
STM R14,R12,12(R13) Saves calling regs (not R13)
LR R12,R15 Address of MAIN in R12
LA R11,4095(,R12)
LA R11,1(,R11)
USING MAIN,R12,R11
LA R14,MAINSAVE Where regs are stored when calls
ST R13,4(,R14) stores backward pointer
ST R14,8(,R13) Stores forward pointer
LR R13,R14
*
*
LA R1,BLDLIST Loading the parameter list
L R15,=V(BUILD) Calling the BUILD subroutine.
BALR R14,R15
*
*
L R13,4(,R13) Loads address of calling rtn regs
LM R14,R12,12(R13) Reloads calling routines regs
BR R14 Return control
LTORG
*****Variables for MAIN*****
MAINSAVE DS 18F Storage for registers
BLDLIST DC A(CARD)
CARD DS CL80
****************************
BUILD CSECT
STM R14,R12,12(13)
LR R12,R15
USING BUILD,R12
LA R14,BLDSAVE
ST R13,4(0,14) Save the forward pointer.
ST R14,8(0,13) Save the backward pointer.
LR R13,R14
SR R6,R6
LM R2,0(1)
USING PROTABLE,R3
*
*
TOP1 XREAD 0(0,R2),80 Reading the card
BC B'0100',END1 Check for EOF
* Here I need to read the values from CARD
* and PRINT them in the output.
*
*
******BUILD METHOD EXIT LINKAGE*****
L R13,4(0,13) Loads address of calling REGS
LM R14,R12,12(13) Reloads calling routines
BR R14 Return control
LTORG
******BUILD METHOD VARIABLES**********
*
*
BLDSAVE DS 18F
PRICE DS 4Z
MAIN CSECT
STM R14,R12,12(R13) Saves calling regs (not R13)
LR R12,R15 Address of MAIN in R12
LA R11,4095(,R12)
LA R11,1(,R11)
USING MAIN,R12,R11
LA R14,MAINSAVE Where regs are stored when calls
ST R13,4(,R14) stores backward pointer
ST R14,8(,R13) Stores forward pointer
LR R13,R14
*
*
LA R1,BLDLIST Loading the parameter list
L R15,=V(BUILD) Calling the BUILD subroutine.
BALR R14,R15
*
*
L R13,4(,R13) Loads address of calling rtn regs
LM R14,R12,12(R13) Reloads calling routines regs
BR R14 Return control
LTORG
*****Variables for MAIN*****
MAINSAVE DS 18F Storage for registers
BLDLIST DC A(CARD)
CARD DS CL80
****************************
BUILD CSECT
STM R14,R12,12(13)
LR R12,R15
USING BUILD,R12
LA R14,BLDSAVE
ST R13,4(0,14) Save the forward pointer.
ST R14,8(0,13) Save the backward pointer.
LR R13,R14
SR R6,R6
LM R2,0(1)
USING PROTABLE,R3
*
*
TOP1 XREAD 0(0,R2),80 Reading the card
BC B'0100',END1 Check for EOF
* Here I need to read the values from CARD
* and PRINT them in the output.
*
*
******BUILD METHOD EXIT LINKAGE*****
L R13,4(0,13) Loads address of calling REGS
LM R14,R12,12(13) Reloads calling routines
BR R14 Return control
LTORG
******BUILD METHOD VARIABLES**********
*
*
BLDSAVE DS 18F