View previous topic :: View next topic
|
Author |
Message |
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
Thanks for your suggestion, Bill. |
You need to consider this as much stronger than a suggeston.
If you refuse to use standard linkage for every assembler module you will cause yourself (and probably others) a great amount of trouble. . . |
|
Back to top |
|
|
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
So, the final edition should be like below:
Code: |
BEGIN CSECT
SAVE (14,12)
BALR R3,0
USING *,R3
LA R15,REGSAVE POINT TO OUR SAVEAREA
XC 0(REGSAVEL,R15),0(R15) ENSURE X'00'S
ST R13,4(,R15) BACKWARD-CHAIN
ST R15,8(,R13) FORWARD-CHAIN
LR R13,R15 POINT TO OUR SAVEAREA
OPEN (TEACHERS,(INPUT)) OPEN INPUT FILE
LTR R15,R15
BNZ RTN2CLLR
LOOP GET TEACHERS,IREC READ A SINGLE TEACHER RECORD
B LOOP REPEAT
ATEND CLOSE TEACHERS
L R13,4(,R13) RESTORE CALLERS R13
RTN2CLLR RETURN (14,12),RC=(15)
DS 0F ENSURE ALIGNMENT
REGSAVE EQU * REGISTER-SAVEAREA
DS 18F 18-WORDS
REGSAVEL EQU *-REGSAVE RSA OVERALL-LGTH
TEACHERS DCB LRECL=L'IREC,DSORG=PS,RECFM=FB,MACRF=(GM),
DDNAME=TEACHER,
EODAD=ATEND
LTORG
YREGS
IREC DS CL80
BEGIN AMODE 24
BEGIN RMODE 24
END |
|
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
I wouldn't use R15 when setting up SAVEAREA and your RTN2CLLR label should be on the L R13,4(R13) statement.
Garry. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Garry,
At this point in the program, R15 is considered a work-register (it's prior to the OPEN) and so, it can be used as such.
Bill |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Bill,
Accepted, but I would still prefer to avoid using R15.
Garry. |
|
Back to top |
|
|
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
Garry Carroll wrote: |
RTN2CLLR label should be on the L R13,4(R13) statement.
Garry. |
Yes, correct...
I find myself so careless sometimes... |
|
Back to top |
|
|
|