View previous topic :: View next topic
|
Author |
Message |
balimanja
New User
Joined: 14 Aug 2007 Posts: 40 Location: Bangalore
|
|
|
|
Hi All,
I am trying to understand how to use DFSORT in an assembly language program. So, may I please request the board members to kindly provide me any simple program you have at your shop that uses DFSORT in an assembly language program. Any simple one would do, as I want to work on it to add other functionalities to it.
Thank you,
Manjunath |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Did you try the DFSORT Application Programming Guide? There's a nice section there should help you out.
EDIT: Maybe good to have this in the DFSORT forum, so that Frank can be aware more easily. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
What have you tried so far? If nothing, then you need to spend some effort and try something on your own -- this is a HELP forum, not a WRITE-YOUR-CODE-FOR-YOU forum. Besides, you are much more likely to understand the code if you write it yourself, then get help getting it working.
Topic moved to DFSORT. |
|
Back to top |
|
|
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
balimanja
This might give you a good start.
Thanks, |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Here's a simple program to invoke DFSORT using the extended parameter list as documented at:
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA60/6.7?DT=20110608113434
Code: |
PL31A CSECT INITIATE EXECUTABLE CONTROL SECTION
R0 EQU 0
R1 EQU 1
R2 EQU 2
R3 EQU 3
R4 EQU 4
R5 EQU 5
R6 EQU 6
R7 EQU 7
R8 EQU 8
R9 EQU 9
R10 EQU 10
R11 EQU 11
R12 EQU 12
R13 EQU 13
R14 EQU 14
R15 EQU 15
SAVE (14,12) SAVE REGISTERS
BALR R12,0 BRANCH AND LINK REG.
USING *,R12 USE REG 12
ST R13,SAVEAREA+4 SAVE BACKWARD POINTER
LA R14,SAVEAREA SET FORWARD PT.ER IN CALLER SAVE AREA
ST R14,8(R13)
LR R13,R14 SET OUR SAVE AREA
LA R1,PARLST31 LOAD ADDR OF PARM PT.ER INTO R1
LINK EP=SORT INVOKE SORT
L R13,4(,R13) GET RETURN ADDRESS
RETURN (14,12),RC=(15) RESTORE REGS,FLAG SAVEAREA,SET RC
PARLST31 DC A(CNTLSTMT) POINTS TO THE CONTROL STATEMENTS
DC A(0) ADDR OF USER EXIT E35
DC A(0) ADDR OF USER EXIT E35
DC F'-1' F'-1' DENOTES END OF THE 31-BIT PARM LIST
CNTLSTMT DS 0H RESERVE HALFWORD FOR LENGTH OF CNTL STMTS
DC AL2(CTLEND-CTLSTART) GET CNTL STMT'S LENGTH IN BYTES
CTLSTART DC C' SORT FIELDS=(1,5,ZD,D) '
DC C' INCLUDE COND=(1,5,ZD,GT,7) '
CTLEND EQU * DUMMY STMT INDICATES END OF CONTROL STMTS
*
*
SAVEAREA DC 18F'00' SAVE AREA
LTORG
DROP R12
LTORG
END
|
|
|
Back to top |
|
|
balimanja
New User
Joined: 14 Aug 2007 Posts: 40 Location: Bangalore
|
|
|
|
Thank you very much Frank.
Thanks everyone for your time and help.
|
|
Back to top |
|
|
|