   C I C S S O R T  -  Platform: MVS/CICS


   This program sorts Temporary Storage queues in CICS environment.


   In this distribution file (CICSSORT.ZIP) there is:

CICSSORT.OBJ             executable for MVS/CICS mainframe, in obj form
CICSSORT.HIL             Hilmas source of this program
CXITSORT.OBJ             executable in Italian language, in obj form
CXITSORT.HIL             Hilmas source in Italian
README.TXT               this help file 
LINKEDIT.JCL             job example to install CICSSORT


OBJ installation:

- Create in MVS a sequential file, for example 'MYUSER.PROGRAM.OBJ'
  with RECFM=FB and LRECL=80, for example of 1 cylinder.

- SEND obj module from PC to MVS in this file in BINARY form, with your 
  3270 emulation; the most important thing is a binary transfer (therefore 
  without ASCII CRLF) in a file with record length of 80 bytes.
  Use this PC command (in a PC with IBM/PCOMM 4.1 3270 emulation installed):

     SEND CICSSORT.OBJ 'MYUSER.PROGRAM.OBJ'

- Prepare a Job to Linkedit transferred obj in a load library visible by
  CICS: use LINKEDIT.JCL as example: fit this JCL to your needs changing 
  library names

- Submit linkedit job to create load module; output library must be a
  load library used by CICS address space.

- Complete installation defining program and transid in PPT and PCT CICS
  tables: 

PPT :
         DFHPPT   TYPE=ENTRY,PROGRAM=CICSSORT,RSL=PUBLIC

PCT :
         DFHPCT   TYPE=ENTRY,
               TRANSID=SORT,PROGRAM=CICSSORT,RSL=PUBLIC

  Put similar parameter if use CEDA interactive CICS management transaction.
  The only important thing is to define the language as Assembler (that
is the default in traditional tables, but not in CEDA).
You can change transid and program name as you like.


Program instruction:

    With this utility you can do a sort of a Temporary Storage queue.
    SORT transaction can be run by user or by a program passing parameters
in COMMAREA.

  Its use by an user in a CICS session is:

    SORT InputTS OutputTS StartField Length  [direction]

  Parameters are self explaining; direction is a letter that can be
  'A' (for ascending) or 'D' (for descending); can be omitted and default
  is ascending.

  In an interactive run you have a display in your screen like this:

sort vsamtn73 myqueue 10 5                                                 
                                                                           
 Start of sequential read of input VSAMTN73                                
 SORT start of  20  records.                                               
 Sort in memory OK, SWAPS = 80                                             
 Start of random read of VSAMTN73 and write of sorted output file MYQUEUE  
 Regular end of sort.                                                      
                                                                           
                                                                           

  If you pass this parameters in commarea, this is its structure:

        INPUT-TS       PIC     X(8).
        FILLER         PIC     X VALUE SPACE.
        OUTPUT-TS      PIC     X(8).
        FILLER         PIC     X VALUE SPACE.
        START-FLD      PIC     X(4).
        FILLER         PIC     X VALUE SPACE.
        LENGTH-FLD     PIC     X(3).
        FILLER         PIC     X VALUE SPACE.
        DIRECTION      PIC     X.

   Numeric fields must be edited, that is must be left filled with blanks.

   The program has some limits, due to limited memory assigned to sort:
- a unique field of sort
- a maximum of 10000 record sorted
- a 64k of internal memory used for sort, that is a maximum number of
  records equal to: 64K / sort-field-length


