Hi! Is it possible to write a program on assembler with subroutines in the same file? I.e. the main program begins with the normal "CEEENTRY" macro and then it is calling subroutines belonging to the same CSECT? I'd like not to change the base register, but those subroutines should create new DSAs and all other staff necessary for calling LE services from the subroutines? I want each subroutine to perform a sepatrate function. Does anyone know how to do it?
Like this:
TEST CEEENTRY PPA=MAINPPA,AUTO=WORKSIZE,MAIN=YES,BASE=(R10,R11)
STORAGE OBTAIN,LENGTH=COPYSIZE,LOC=BELOW
LR R9,R1 Move address of storage
L R2,=A(COPYAREA) Point to data to copy
L R3,=A(COPYSIZE) Get size to copy
LR R14,R9 Point to destination
LR R15,R3 Output size = input size
MVCL R14,R2 Copy the data
USING COPYAREA,R9 And now address our copy
* ====================================================================
* First verify that POSIX is ON -- cannot run if not
* ====================================================================
BAL R14,QPOSIX Make sure POSIX enabled
BNZ CLEANUP Failed, get out now
* ====================================================================
* Next let's fetch and display version information.
* ====================================================================
BAL R14,QVERSION Query and display VERSION info
BNZ CLEANUP Failed, get out now
* ====================================================================
* OK, we got and displayed the version. Now create a context.
* ====================================================================
BAL R14,CREATE Create a context
BNZ CLEANUP Failed, get out now
Thank you very much!
Eugene
Subroutines in LE assembler program
-
- Similar Topics
- Replies
- Views
- Last post
-
-
Assembler program accessing IMS DB Database
by gschhatwal1176 » Sat Aug 08, 2020 12:34 pm » in Assembler - 5
- 6747
-
by NicC
View the latest post
Sun Aug 09, 2020 2:53 am
-
-
-
how to decompress DB2 SMF records in assembler program
by chaat » Fri Feb 19, 2021 9:53 am » in Assembler - 3
- 3462
-
by willy jensen
View the latest post
Sun Feb 21, 2021 4:26 pm
-
-
-
Calling Java program on UNIX/USS from a COBOL CICS program?
by zbius » Tue Nov 05, 2024 2:37 pm » in IBM Cobol - 2
- 2547
-
by zbius
View the latest post
Wed Nov 06, 2024 6:02 pm
-
-
- 2
- 3126
-
by enrico-sorichetti
View the latest post
Mon Oct 30, 2023 6:25 pm
-
- 4
- 3025
-
by sergeyken
View the latest post
Mon May 22, 2023 12:52 am