IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Requesting a simple Assembler + DFSort program


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
balimanja

New User


Joined: 14 Aug 2007
Posts: 40
Location: Bangalore

PostPosted: Fri May 04, 2012 4:04 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri May 04, 2012 4:09 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Fri May 04, 2012 4:53 pm
Reply with quote

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
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Fri May 04, 2012 6:37 pm
Reply with quote

balimanja
This might give you a good start.

Thanks,
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri May 04, 2012 7:21 pm
Reply with quote

Or possibly this.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri May 04, 2012 10:53 pm
Reply with quote

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
View user's profile Send private message
balimanja

New User


Joined: 14 Aug 2007
Posts: 40
Location: Bangalore

PostPosted: Wed May 09, 2012 10:22 am
Reply with quote

Thank you very much Frank.

Thanks everyone for your time and help.

icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts DFSORT GUID DFSORT/ICETOOL 3
No new posts Using API Gateway from CICS program CICS 0
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top