The SORT Program
Simple Examples
  Table of Contents  v-16.01.01 sortut01.htm 
  Introduction
  Sort, Standard Sequence for ASCII
  Case Insensitive Sort, ASCII & ALTSEQ
  Mainframe JCL for ZOS SORT
  Sort a Record Sequential File
  Case Insensitive SORT for EBCDIC
  Case Insensitive SORT for ASCII
  CMD Files, Micro Focus SORT
  ASCII/Text to ASCII/Text File
  ASCII/Text to ASCII-Sequential
  ASCII/Text to EBCDIC-Sequential
  Special Handling
  Set the Environment
  Display and Log Messages
  Technical Details
  Record Structure for the Test File
  Summary
  Software Agreement and Disclaimer
  Downloads and Links
  Current Server or Internet Access
  Internet Access Required
  Glossary of Terms
  Comments or Feedback
  Company Overview
The SimoTime Home Page 

Table of Contents Previous Section Next Section Introduction

This suite of programs will describe how to do use the Micro Focus SORT program with a Windows command line or Mainframe JCL. The Mainframe JCL will execute on a Mainframe System with ZOS. A small sequential file is created and then sorted.

The source code, data sets and documentation are provided in a single zipped file called SORTUT01.ZIP. This zipped file may be downloaded from the SimoTime Web site. In the Windows environment the file names have file extensions. When the JCL member is uploaded to a ZOS Mainframe from the Windows and Micro Focus environment the file extension is dropped.


We have made a significant effort to ensure the documents and software technologies are correct and accurate. We reserve the right to make changes without notice at any time. The function delivered in this version is based upon the enhancement requests from a specific group of users. The intent is to provide changes as the need arises and in a timeframe that is dependent upon the availability of resources.

Copyright © 1987-2017
SimoTime Technologies
All Rights Reserved

Table of Contents Previous Section Next Section Sort, Standard Sequence for ASCII

The following shows the content of a record sequential file that has been sorted based on the character in position five (5) using the standard collating sequence for the system.

000   ...1....:....2....:....3....:....4....:....5....:....6....:....7.
003 0 F0 1111 0000 30 0011 0000
007 1 F1 1111 0001 31 0011 0001
001 A C1 1100 0001 41 0100 0001
002 B C2 1100 0010 42 0100 0010
004 C C3 1100 0011 43 0100 0011
005 a 81 1000 0001 61 0110 0001
006 b 82 1000 0010 62 0110 0010

Table of Contents Previous Section Next Section Case Insensitive Sort, ASCII & ALTSEQ

The following shows the content of a record sequential file that has been sorted based on the character in position five (5) of each record. This example will use an ALTSEQ Table for an ASCII-encoded environment and will do a case insensitive sort.

000   ...1....:....2....:....3....:....4....:....5....:....6....:....7.
003 0 F0 1111 0000 30 0011 0000
007 1 F1 1111 0001 31 0011 0001
999 9 F9 1111 1001 39 0011 1001
001 A C1 1100 0001 41 0100 0001
005 a 81 1000 0001 61 0110 0001
002 B C2 1100 0010 42 0100 0010
006 b 82 1000 0010 62 0110 0010
004 C C3 1100 0011 43 0100 0011

Table of Contents Previous Section Next Section Mainframe JCL for ZOS SORT

This section describes the various JCL members that are used to create and sort files in a mainframe-oriented environment. The term "Mainframe-Oriented" is used to refer to the following.

1 An IBM Mainframe System running the ZOS Operating System
2 Micro Focus Mainframe Express running in a Windows Environment
3 Micro Focus Studio or Server for Mainframe Migration running in a Windows, UNIX or Linux environment
  Create and Sort Files in a Mainframe-Oriented Environment

Table of Contents Previous Section Next Section Sort a Record Sequential File

The following JCL member (SORTX5J1.jcl) is used to create a record sequential file with eighty (80) byte fixed length records. The next job step will then sort the file based on the character in position five (5). The Sort will create a new record sequential file with eighty (80) byte fixed length records.

//SORTX5J1 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//* *******************************************************************
//*        This program is provided by SimoTime Technologies          *
//*           (C) Copyright 1987-2017 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text   - Create a Sequential Data Set using IEBGENER and Sort.
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* Step 1, DELSEQS1 will delete any previously created file.
//* Step 2, CRTSEQS2 will create a new file.
//* Step 3, SRTSEQS3 will sort the file.
//* Step 4, EXTENDS4 will add a record to the input file.
//* Step 5, SRTSEQS5 will sort the file.
//*
//* This job uses instream sorting specifications.
//*
//* This set of programs will run on a mainframe under MVS or on a
//* Personal Computer with Windows and Micro Focus Mainframe Express.
//*
//* 1. Demonstrate how to use IEFBR14 with DD statements to delete
//*    files that have been created by a previous execution of this
//*    job.
//* 2. Demonstrate how to use IEBGENER to create and populate a new
//*    record sequential file with eighty (80) byte fixed length
//*    records.
//* 3. Demonstrate how to use the SORT program to sort a file based
//*    on the value in position five (5) of each record.
//*
//* *******************************************************************
//* Step   1 of 5, Delete any previously created file...
//*
//DELSEQS1 EXEC PGM=IEFBR14
//SEQBFORE DD  DSN=SIMOTIME.DATA.SEQBE4D1,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//SEQAFTD1 DD  DSN=SIMOTIME.DATA.SEQAFTD1,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//SEQAFTD2 DD  DSN=SIMOTIME.DATA.SEQAFTD2,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//*
//* *******************************************************************
//* Step   2 of 5, Create and populate a new QSAM file...
//*
//CRTSEQS2 EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  DUMMY
//SYSUT1   DD  *
000   ...1....:....2....:....3....:....4....:....5....:....6....:....7.
001 A C1 1100 0001 41 0100 0001
002 B C2 1100 0010 42 0100 0010
003 0 F0 1111 0000 30 0011 0000
004 C C3 1100 0011 43 0100 0011
/*
//SYSUT2   DD  DSN=SIMOTIME.DATA.SEQBE4D1,
//             DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//*
//* *******************************************************************
//* Step   3 of 5, Sort the file...
//*
//SRTSEQS3 EXEC PGM=SORT,
//             REGION=1024K
//SYSIN    DD  *
* ..:....1....:....2....:....3....:....4....:....5....:....6....:....7.
         SORT  FIELDS=(5,1,CH,A)
/*
//SORTIN   DD  DSN=SIMOTIME.DATA.SEQBE4D1,DISP=SHR
//SORTOUT  DD  DSN=SIMOTIME.DATA.SEQAFTD1,DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//SYSOUT   DD  SYSOUT=*
//*
//* *******************************************************************
//* Step   4 of 5, Extend or add records to an existing QSAM file...
//*
//EXTENDS4 EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  DUMMY
//* :....1....:....2....:....3....:....4....:....5....:....6....:....7.
//SYSUT1   DD  *
005 1 F1 1111 0001 31 0011 0001
/*
//SYSUT2   DD  DSN=SIMOTIME.DATA.SEQBE4D1,
//             DISP=(MOD,KEEP,KEEP),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//*
//* *******************************************************************
//* Step   5 of 5, Sort the file...
//*
//SRTSEQS5 EXEC PGM=SORT,
//             REGION=1024K
//SYSIN    DD  *
* ..:....1....:....2....:....3....:....4....:....5....:....6....:....7.
         SORT  FIELDS=(5,1,CH,A)
/*
//SORTIN   DD  DSN=SIMOTIME.DATA.SEQBE4D1,DISP=SHR
//SORTOUT  DD  DSN=SIMOTIME.DATA.SEQAFTD2,DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//SYSOUT   DD  SYSOUT=*

The preceding job may be executed on the mainframe as an MVS batch job. The JOB and DD statements will require modification prior to execution in different mainframe environments. It may also be executed on the PC running the Micro Focus Mainframe Express product.

Table of Contents Previous Section Next Section Case Insensitive SORT for EBCDIC

The following JCL member (SORTCEJ1.jcl) will create an input file that is out-of-sequence based on the character in position five (5) of a record. Subsequent job steps will sort the file. The last job step will do a case insensitive sort with the upper and lower case letters grouped together. Since the ALTSEQ function of the sort requires a table to be defined in hexadecimal notation this job will only work with EBCDIC encoded files.

The Sort steps will create new, sorted record sequential files with eighty (80) byte fixed length records

//SORTCEJ1 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//* *******************************************************************
//*        This program is provided by SimoTime Technologies          *
//*           (C) Copyright 1987-2017 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text   - Create a Sequential Data Set using IEBGENER and Sort.
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* Step 1, DELSEQS1 will delete any previously created file.
//* Step 2, CRTSEQS2 will create a new file.
//* Step 3, SRTSEQS3 will sort the file.
//* Step 4, EXTENDS4 will add a record to the input file.
//* Step 5, SRTSEQS5 will do a case insensitive sort of the file .
//*
//* CAUTION! Since the ALTSEQ is defined at the binary (or hexadecimal)
//*          level step 5 will only work for EBCDIC-encoded files.
//*
//* Refer to SORTCAJ1.JCL for a case insensitive sort for the ASCII
//* encoded environment.
//*
//* This job uses instream sorting specifications.
//*
//* This set of programs will run on a mainframe under MVS or on a
//* Personal Computer with Windows and Micro Focus Mainframe Express.
//*
//* 1. Demonstrate how to use IEFBR14 with DD statements to delete
//*    files that have been created by a previous execution of this
//*    job.
//* 2. Demonstrate how to use IEBGENER to create and populate a new
//*    record sequential file with eighty (80) byte fixed length
//*    records.
//* 3. Demonstrate how to use the SORT program to sort a file based
//*    on the value in position five (5) of each record.
//* 4. Demonstrate how to do a case insensitive sort. A normal sort
//*    sequence will sort all the uppercase together and then all the
//*    lower case together in a group, for example ABCDEabcde.
//*    Sometimes it is desirable to sort the upper and lower case
//*    together, for example AaBbCcDdEe. This is referred to as a
//*    case insensitive sort.
//*
//* *******************************************************************
//* Step   1 of 5, Delete any previously created file...
//*
//DELSEQS1 EXEC PGM=IEFBR14
//SEQBFORE DD  DSN=SIMOTIME.DATA.SEQBE4D1,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//SEQAFTD1 DD  DSN=SIMOTIME.DATA.SEQAFTD1,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//SEQAFTD2 DD  DSN=SIMOTIME.DATA.SEQAFTD2,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//*
//* *******************************************************************
//* Step   2 of 5, Create and populate a new QSAM file...
//*
//CRTSEQS2 EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  DUMMY
//SYSUT1   DD  *
000   ...1....:....2....:....3....:....4....:....5....:....6....:....7.
001 A C1 1100 0001 41 0100 0001
002 B C2 1100 0010 42 0100 0010
003 0 F0 1111 0000 30 0011 0000
004 C C3 1100 0011 43 0100 0011
005 a 81 1000 0001 61 0110 0001
006 b 82 1000 0010 62 0110 0010
007 1 F1 1111 0001 31 0011 0001
/*
//SYSUT2   DD  DSN=SIMOTIME.DATA.SEQBE4D1,
//             DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//*
//* *******************************************************************
//* Step   3 of 5, Sort the file...
//*
//SRTSEQS3 EXEC PGM=SORT,
//             REGION=1024K
//SYSIN    DD  *
* ..:....1....:....2....:....3....:....4....:....5....:....6....:....7.
         SORT  FIELDS=(5,1,CH,A,1,3,CH,A)
/*
//SORTIN   DD  DSN=SIMOTIME.DATA.SEQBE4D1,DISP=SHR
//SORTOUT  DD  DSN=SIMOTIME.DATA.SEQAFTD1,DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//SYSOUT   DD  SYSOUT=*
//*
//* *******************************************************************
//* Step   4 of 5, Extend or add records to an existing QSAM file...
//*
//EXTENDS4 EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  DUMMY
//* :....1....:....2....:....3....:....4....:....5....:....6....:....7.
//SYSUT1   DD  *
999 9 F9 1111 1001 39 0011 1001
/*
//SYSUT2   DD  DSN=SIMOTIME.DATA.SEQBE4D1,
//             DISP=(MOD,KEEP,KEEP),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//*
//* *******************************************************************
//* Step   5 of 5, Do a Case Insensitive Sort of the file...
//*
//* CAUTION! Since the ALTSEQ is defined at the binary (or hexadecimal)
//*          level step 5 will only work for EBCDIC-encoded files.
//*
//SRTSEQS5 EXEC PGM=SORT,
//             REGION=1024K
//SYSIN    DD  *
* ..:....1....:....2....:....3....:....4....:....5....:....6....:....7.
  SORT FIELDS=(5,1,AQ,A)
  ALTSEQ CODE=(81C1,82C2,83C3,84C4,85C5,86C6,87C7,88C8,89C9,
               91D1,92D2,93D3,94D4,95D5,96D6,97D7,98D8,99D9,
               A2E2,A3E3,A4E4,A5E5,A6E6,A7E7,A8E8,A9E9)
/*
//SORTIN   DD  DSN=SIMOTIME.DATA.SEQBE4D1,DISP=SHR
//SORTOUT  DD  DSN=SIMOTIME.DATA.SEQAFTD2,DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//SYSOUT   DD  SYSOUT=*

Table of Contents Previous Section Next Section Case Insensitive SORT for ASCII

The following JCL member (SORTCAJ1.jcl) will create an input file that is out-of-sequence based on the character in position five (5) of a record. Subsequent job steps will sort the file. The last job step will do a case insensitive sort with the upper and lower case letters grouped together. Since the ALTSEQ function of the sort requires a table to be defined in hexadecimal notation this job will only work with ASCII encoded files in the Micro Focus environment.

The Sort steps will create new, sorted record sequential files with eighty (80) byte fixed length records

//SORTCAJ1 JOB SIMOTIME,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//* *******************************************************************
//*        This program is provided by SimoTime Technologies          *
//*           (C) Copyright 1987-2017 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text   - Create a Sequential Data Set using IEBGENER and Sort.
//* Author - SimoTime Technologies
//* Date   - January 24, 1996
//*
//* Step 1, DELSEQS1 will delete any previously created file.
//* Step 2, CRTSEQS2 will create a new file.
//* Step 3, SRTSEQS3 will sort the file.
//* Step 4, EXTENDS4 will add a record to the input file.
//* Step 5, SRTSEQS5 will do a case insensitive sort of the file .
//*
//* CAUTION! Since the ALTSEQ is defined at the binary (or hexadecimal)
//*          level step 5 will only work for ASCII-encoded files.
//*
//* Refer to SORTCEJ1.JCL for a case insensitive sort for the EBCDIC
//* encoded environment.
//*
//* This job uses instream sorting specifications.
//*
//* This set of programs will run on a mainframe under MVS or on a
//* Personal Computer with Windows and Micro Focus Mainframe Express.
//*
//* 1. Demonstrate how to use IEFBR14 with DD statements to delete
//*    files that have been created by a previous execution of this
//*    job.
//* 2. Demonstrate how to use IEBGENER to create and populate a new
//*    record sequential file with eighty (80) byte fixed length
//*    records.
//* 3. Demonstrate how to use the SORT program to sort a file based
//*    on the value in position five (5) of each record.
//* 4. Demonstrate how to do a case insensitive sort. A normal sort
//*    sequence will sort all the uppercase together and then all the
//*    lower case together in a group, for example ABCDEabcde.
//*    Sometimes it is desirable to sort the upper and lower case
//*    together, for example AaBbCcDdEe. This is referred to as a
//*    case insensitive sort.
//*
//* *******************************************************************
//* Step   1 of 5, Delete any previously created file...
//*
//DELSEQS1 EXEC PGM=IEFBR14
//SEQBFORE DD  DSN=SIMOTIME.DATA.SEQBE4D1,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//SEQAFTD1 DD  DSN=SIMOTIME.DATA.SEQAFTD1,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//SEQAFTD2 DD  DSN=SIMOTIME.DATA.SEQAFTD2,DISP=(MOD,DELETE,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//*
//* *******************************************************************
//* Step   2 of 5, Create and populate a new QSAM file...
//*
//CRTSEQS2 EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  DUMMY
//SYSUT1   DD  *
000   ...1....:....2....:....3....:....4....:....5....:....6....:....7.
001 A C1 1100 0001 41 0100 0001
002 B C2 1100 0010 42 0100 0010
003 0 F0 1111 0000 30 0011 0000
004 C C3 1100 0011 43 0100 0011
005 a 81 1000 0001 61 0110 0001
006 b 82 1000 0010 62 0110 0010
007 1 F1 1111 0001 31 0011 0001
/*
//SYSUT2   DD  DSN=SIMOTIME.DATA.SEQBE4D1,
//             DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//*
//* *******************************************************************
//* Step   3 of 5, Sort the file...
//*
//SRTSEQS3 EXEC PGM=SORT,
//             REGION=1024K
//SYSIN    DD  *
* ..:....1....:....2....:....3....:....4....:....5....:....6....:....7.
         SORT  FIELDS=(5,1,CH,A)
/*
//SORTIN   DD  DSN=SIMOTIME.DATA.SEQBE4D1,DISP=SHR
//SORTOUT  DD  DSN=SIMOTIME.DATA.SEQAFTD1,DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//SYSOUT   DD  SYSOUT=*
//*
//* *******************************************************************
//* Step   4 of 5, Extend or add records to an existing QSAM file...
//*
//EXTENDS4 EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  DUMMY
//* :....1....:....2....:....3....:....4....:....5....:....6....:....7.
//SYSUT1   DD  *
999 9 F9 1111 1001 39 0011 1001
/*
//SYSUT2   DD  DSN=SIMOTIME.DATA.SEQBE4D1,
//             DISP=(MOD,KEEP,KEEP),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//*
//* *******************************************************************
//* Step   5 of 5, Do a Case Insensitive Sort of the file...
//*
//* CAUTION! Since the ALTSEQ is defined at the binary (or hexadecimal)
//*          level step 5 will only work for ASCII-encoded files.
//*
//SRTSEQS5 EXEC PGM=SORT,
//             REGION=1024K
//SYSIN    DD  *
* ..:....1....:....2....:....3....:....4....:....5....:....6....:....7.
  SORT FIELDS=(5,1,AQ,A)
  ALTSEQ CODE=(6141,6242,6343,6444,6545,6646,6747,6848,6949,
               6A4A,6B4B,6C4C,6D4D,6E4E,6F4F,7050,7151,7252,
               7353,7454,7555,7656,7757,7858,7959,7A5A)
/*
//SORTIN   DD  DSN=SIMOTIME.DATA.SEQBE4D1,DISP=SHR
//SORTOUT  DD  DSN=SIMOTIME.DATA.SEQAFTD2,DISP=(NEW,CATLG,DELETE),
//             STORCLAS=MFI,
//             SPACE=(TRK,5),
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)
//SYSOUT   DD  SYSOUT=*

Table of Contents Previous Section Next Section CMD Files, Micro Focus SORT

This section provides a suite of Windows Command Files that may be used to execute the Micro Focus SORT program in a Windows environment.

Table of Contents Previous Section Next Section ASCII/Text to ASCII/Text File

The following Windows Command File (SORTTXE1.cmd) is used to create an ASCII/Text file and then sort the file based on the character in position five (5). The Sort will create a new ASCII/Text file.

@echo OFF
rem  * *******************************************************************
rem  *               SORTTXE1.cmd - a Windows Command File               *
rem  *         This program is provided by SimoTime Technologies         *
rem  *           (C) Copyright 1987-2017 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  * Step 1, Set environment and delete any previously created files.
rem  * Step 2, Create an ASCII/Text (or Line Sequential) file using the
rem  *         Windows echo command and piping the output to SORTIN.
rem  * Step 3, Sort the SORTIN file and create SORTOUT. The sorting
rem  *         specifications are included as a command line parameter.
rem  *         The SORTIN file is an ASCII/Text file.
rem  *         The SORTOUT file is an ASCII/Text file.
rem  ******************************************************************
rem  * Set Environment Variables, Delete previously created files
:STEP01
     echo Set the environment, delete previously created files...
rem  * The ezSetEnv is a Windows Command file that sets environment
rem  * variables that are common to a variety of sam[le applications
rem  * provided in the SimoTime collection.
     call ..\Env1BASE
     call SimoNOTE "SORTTXE1.cmd is STARTING..."
rem  * Set environment variables that are unique to this job...
     set SORTIN=%BaseLib1%\DATA\Wrk1\SRTBFORE.TXT
     set SORTOUT=%BaseLib1%\DATA\Wrk1\SRTATEXT.TXT
rem  * Delete previously created files...
     if exist %SORTIN%  erase %SORTIN%
     if exist %SORTOUT% erase %SORTOUT%
rem  *
rem  ******************************************************************
rem  * Create a test file to be sorted
:STEP02
     echo Create the SORTIN file...
rem  *    ....:....1....:....2....:....3....:....4....:....5....:....6
     echo 001 A C1 1100 0001 41 0100 0001>  %SORTIN%
     echo 002 B C2 1100 0010 42 0100 0010>> %SORTIN%
     echo 003 0 F0 1111 0000 30 0011 0000>> %SORTIN%
     echo 004 C C3 1100 0011 43 0100 0013>> %SORTIN%
rem  *
rem  ******************************************************************
rem  * Sort the test file to be sorted
:STEP03
     echo Start the SORT . . .
     MFSORT SORT FIELDS=(5,1,CH,A) use %SORTIN% ORG LS give %SORTOUT%
     if errorlevel = 1 set JobStatus=0016
     echo Job Status after the SORT is = %JobStatus%
     if not "%JobStatus%" == "0000" goto :EOJNOK
rem  *
rem  ******************************************************************
rem  * Normal EOJ, Display the sorted test file
:EOJAOK
     call SimoNOTE "SORTXTE1.cmd is FINISHED..."
echo ....:....1....:....2....:....3....:....4....:....5....:....6
     type %SORTOUT%
     echo SortOut=%SORTOUT%
     goto :EOJ
rem  *
rem  ******************************************************************
rem  * ABENDING, display a message and pause
:EOJNOK
     call SimoNOTE "SORTTXE1.cmd is ABENDING..."
rem  *
rem  ******************************************************************
rem  * ABENDING, display a message and pause
:EOJ
     pause
     exit /B %JobStatus%

Table of Contents Previous Section Next Section ASCII/Text to ASCII-Sequential

The following Windows Command File (SORTA5E1.cmd) is used to create an ASCII/Text file and then sort the file based on the character in position five (5). The Sort will create a new ASCII-encoded, record sequential file with fixed-length, eighty (80) byte records.

@echo OFF
rem  * *******************************************************************
rem  *               SORTA5E1.CMD - a Windows Command File               *
rem  *         This program is provided by SimoTime Technologies         *
rem  *           (C) Copyright 1987-2017 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  * Step 1, Set environment and delete any previously created files.
rem  * Step 2, Create an ASCII/Text (or Line Sequential) file using the
rem  *         Windows echo command and piping the output to SORTIN.
rem  * Step 3, Sort the SORTIN file and create SORTOUT. The sorting
rem  *         specifications are included as a command line parameter.
rem  *         The SORTIN file is an ASCII/Text file.
rem  *         The SORTOUT file is an ASCII-encoded, record sequential
rem  *         file with eighty (80) byte, fixed length records.
rem  ******************************************************************
rem  * Set Environment Variables, Delete previously created files
:STEP01
     echo Set the environment, delete previously created files...
rem  * The ezSetEnv is a Windows Command file that sets environment
rem  * variables that are common to a variety of sam[le applications
rem  * provided in the SimoTime collection.
     call ..\Env1BASE
     call SimoNOTE "SORTA5E1.CMD is STARTING..."
rem  * Set environment variables that are unique to this job...
     set SORTIN=%BaseLib1%\DataLibA\Wrk1\SRTBFORE.TXT
     set SORTOUT=%BaseLib1%\DataLibA\Wrk1\SRTARSEQ.DAT
rem  * Delete previously created files...
     if exist %SORTIN%  erase %SORTIN%
     if exist %SORTOUT% erase %SORTOUT%
rem  *
rem  ******************************************************************
rem  * Create a test file to be sorted
:STEP02
     echo Create the SORTIN file...
rem  *    ....:....1....:....2....:....3....:....4....:....5....:....6
     echo 001 A C1 1100 0001 41 0100 0001>  %SORTIN%
     echo 002 B C2 1100 0010 42 0100 0010>> %SORTIN%
     echo 003 0 F0 1111 0000 30 0011 0000>> %SORTIN%
     echo 004 C C3 1100 0013 43 0100 0013>> %SORTIN%
rem  *
rem  ******************************************************************
rem  * Sort the test file to be sorted
:STEP03
     echo Start the SORT . . .
     MFSORT SORT FIELDS=(5,1,CH,A) use %SORTIN% ORG LS give %SORTOUT% RECORD F,80 ORG SQ
     if errorlevel = 1 set JobStatus=0016
     echo Job Status after the SORT is = %JobStatus%
     if not "%JobStatus%" == "0000" goto :EOJNOK
rem  *
rem  ******************************************************************
rem  * Normal EOJ, Display the sorted test file
:EOJAOK
     call SimoNOTE "SORTA5E1.CMD is FINISHED..."
     echo SortOut=%SORTOUT%
     goto :EOJ
rem  *
rem  ******************************************************************
rem  * ABENDING, display a message and pause
:EOJNOK
     call SimoNOTE "SORTA5E1.CMD is ABENDING..."
rem  *
rem  ******************************************************************
rem  * ABENDING, display a message and pause
:EOJ
     pause
     exit /B %JobStatus%

Table of Contents Previous Section Next Section ASCII/Text to EBCDIC-Sequential

The following Windows Command File (SORTE5E1.cmd) is used to create an ASCII/Text file and then sort the file based on the character in position five (5). The Sort will create a new EBCDIC-encoded, record sequential file with fixed-length, eighty (80) byte records.

@echo OFF
rem  * *******************************************************************
rem  *               SORTE5E1.CMD - a Windows Command File               *
rem  *         This program is provided by SimoTime Technologies         *
rem  *           (C) Copyright 1987-2017 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  * Step 1, Set environment and delete any previously created files.
rem  * Step 2, Create an ASCII/Text (or Line Sequential) file using the
rem  *         Windows echo command and piping the output to SORTIN.
rem  * Step 3, Sort the SORTIN file and create SORTOUT. The sorting
rem  *         specifications are included as a command line parameter.
rem  *         The SORTIN file is an ASCII/Text file.
rem  *         The SORTOUT file is an EBCDIC-encoded, record sequential
rem  *         file with eighty (80) byte, fixed length records.
rem  ******************************************************************
rem  *   Step 1 of 4, Set Environment, Delete previously created files
:STEP01
rem  * The ezSetEnv is a Windows Command file that sets environment
rem  * variables that are common to a variety of sample applications
rem  * provided in the SimoTime collection.
     set JobName=SORTE5E1
     call ..\Env1BASE
     call SimoNOTE "* %JobName% is STARTING..."
     call SimoNOTE "* %JobName% Job STEP01, Set Variables, Map File Names..."
rem  * Set environment variables that are unique to this job...
     set SORTIN=%BaseLib1%\DATA\Wrk1\SRTBFORE.TXT
     set SORTOUT=%BaseLib1%\DATA\Wrk1\SRTERSEQ.DAT
rem  * Delete previously created files...
     if exist %SORTIN%  erase %SORTIN%
     if exist %SORTOUT% erase %SORTOUT%
rem  *
rem  ******************************************************************
rem  *  Step 2 of 4, Create a test file to be sorted
:STEP02
     call SimoNOTE "* %JobName% Job STEP02, Create a Primary Test File..."
rem  *    ....:....1....:....2....:....3....:....4....:....5....:....6
     echo 001 A C1 1100 0001 41 0100 0001>  %SORTIN%
     echo 002 C C3 1100 0011 43 0100 0011>> %SORTIN%
     echo 003 0 F0 1111 0000 30 0011 0000>> %SORTIN%
     echo 004 c 83 1000 0011 63 0110 0031>> %SORTIN%
     echo 005 B C2 1100 0010 42 0100 0010>> %SORTIN%
     call SimoNOTE "* %JobName% Job STEP02, Primary Test File is as follows..."
     call SimoNOTE "* %JobName% Job STEP02, %SORTIN% "
rem  *
rem  ******************************************************************
rem  *   Step 3 of 4, Convert to EBCDIC and Sort
:STEP03
     call SimoNOTE "* %JobName% Job STEP03, Convert to EBCDIC and Sort"
     MFSORT CHAR-EBCDIC SORT FIELDS=(5,1,CH,A,1,3,CH,A) use %SORTIN% ORG LS give %SORTOUT% RECORD F,80 ORG SQ
     if "%errorlevel%" == "1" set JobStatus=0016
     echo Job Status after the SORT is = %JobStatus%
     if not "%JobStatus%" == "0000" goto :EOJNOK
     call SimoNOTE "* %JobName% Job STEP03, Sorted EBCDIC File is as follows..."
     call SimoNOTE "* %JobName% Job STEP03, %SORTOUT% "

rem  *
rem  ******************************************************************
rem  * Step 4 of 4, Sort using a User-Defined ALTSEQ Table
:STEP04
     call SimoNOTE "* %JobName% Job STEP04, Sort ASCII/Text in EBCDIC Sequence use ALTSEQ..."
     set SORTOUT=%BaseLib1%\DATA\Wrk1\SRTELSEQ.txt
     set ALTSEQT1=%BaseLib1%\PARMLIB\SRTQIAOE.ctl
     call SimoNOTE "* Sort using a User-Defined ALTSEQ Table "
     MFSORT take %ALTSEQT1% use %SORTIN% ORG LS give %SORTOUT% ORG LS
     if "%errorlevel%" == "1" set JobStatus=0016
     echo Job Status after the SORT is = %JobStatus%
     if not "%JobStatus%" == "0000" goto :EOJNOK
     call SimoNOTE "* %JobName% Job STEP04, Sorted LSEQ in EBC-sequence is as follows..."
     call SimoNOTE "* %JobName% Job STEP04, %SORTOUT% "
rem  *
rem  ******************************************************************
rem  * Normal EOJ, Display the sorted test file
:EOJAOK
     call SimoNOTE "* SORTE5E1.CMD is FINISHED..."
     echo SORTOUT=%SORTOUT%
     goto :EOJ
rem  *
rem  ******************************************************************
rem  * ABENDING, display a message and pause
:EOJNOK
     call SimoNOTE "* SORTE5E1.CMD is ABENDING..."
rem  *
rem  ******************************************************************
rem  * ABENDING, display a message and pause
:EOJ
     pause
     exit /B %JobStatus%

Table of Contents Previous Section Next Section Special Handling

This section provides additional detail about the commonly used or shared routines that set the environment and log job messages.

Table of Contents Previous Section Next Section Set the Environment

A command file (ENV1BASE.cmd) is called from other command files to set commonly used environment variables. This provides a single point of definition. The following is a listing of the contents of the command file.

@echo OFF
rem  * *******************************************************************
rem  *               ENV1BASE.cmd - a Windows Command File               *
rem  *        This program is provided by SimoTime Technologies          *
rem  *           (C) Copyright 1987-2017 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text   - Provide a single point to set common environment variables.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * Set the commonly used environment variables. This is used to provide
rem  * a single point for managing the commonly used environment variables.
rem  *
     set SimoLIBR=c:\SimoLIBR
     set BASELIB1=c:\SIMOSAM1\DEVL
     set BASELIB8=c:\SimoSAM8
     set BaseWIP1=c:\SimoSAM1\WIP1
     set DATAZERO=c:\SIMODATA\DEVL\DATA\ZERO
     set BASEAPP=%BaseLib1%
     set BASESYS=%BaseLib1%\SYS1
     set BASECAT=%BaseLib1%\DATA
     set SYSLOG=%BASESYS%\LOGS\SYSLOG_USER.DAT
     set SYSOUT=%BASEAPP%\LOGS\SYSOUT_SIMSAM01.TXT
     set SLZMSG=%BASEAPP%\LOGS\SLZMSG_USER.TXT
     set PostNOTE=%BASEAPP%\LOGS\JOBLOG_SIMONOTE.TXT
     set SimoNOTE=%BASEAPP%\LOGS\JOBLOG_SIMONOTE.TXT
     call SIMONOTE "* SIMONOTE Log File is %SIMONOTE% "
rem  *
     set MQBASE=C:\Program Files\IBM\WebSphere MQ
rem  *
rem  * Set the location for the Apache-Tomcat Server...
     set CATALINA_HOME=C:\APACHETC\apache-tomcat-7.0.52
rem  *
rem  * Set the Environment for the Java Environment...
     set JAVABASE=C:\Program Files (x86)\Java\jdk1.8.0_112
     set JAVASDK="%JAVABASE%\bin"
     set JAVA_HOME=%JAVABASE%
     set JRE_HOME=%JAVABASE%
rem  *
rem  * Set the environment for the Micro Focus technology...
     set MIFOEDEV=C:\Program Files (x86)\Micro Focus\Enterprise Developer
     set MIFOVCBL=C:\Program Files (x86)\Micro Focus\Visual COBOL
     set MIFOESTU=C:\Program Files (x86)\Micro Focus\Studio Enterprise Edition 6.0
     set MIFOEMFE="C:\Program Files (x86)\Micro Focus\Mainframe Express"
rem  *
rem  * Large file support, performance tuning and record locking of the File Handler
     set EXTFH=%BASESYS%\CONFIG\EXTFHBIG.CFG
rem  *
rem  * For IMS Support
     set ES_IMSLIB=%BASEAPP%\IMSLIB
     set ES_ACBLIB=%BASEAPP%\IMSLIB
rem  *
rem  * EZASOKETS Check EZASOKETS Enabled box or set ES_EZASOKET_SUPPORT=YES
     set EZACONFG=BASESYS1\CONFIG\EZACONFG.dat
rem  *
rem  * Resource Allocation and Performance for SORT and non-Relational Data
rem  set MFJSENGINE=SYNCSORT
     set SORTSCHEME=1
     set SORTSPACE=750000000
     set TMP=C:\SORTWORK
rem  *
     set ES_ALLOC_OVERRIDE=%BASESYS%\CONFIG\CATMAPA1.cfg
rem  * For CORE_ON_ERROR function, ABEND Dump
rem  *     set COBCONFIG_=%BASESYS%\CONFIG\diagnose.cfg
rem  *
rem  * Consolidated Trace Facility (CTF)
rem  *     set MFTRACE_CONFIG=%BASESYS%\CONFIG\ctf.cfg
rem  *     set MFTRACE_LOGS=c:\ctflogs
rem  *
rem  * For Job Restart, ABEND Recovery
     set MF_UCC11=Y
     set ES_JES_RESTART=Y
rem  *
rem  * Set environment for MFBSI (Micro Focus Batch Scheduling Interface)
     set ES_EMP_EXIT_1=mfbsiemx
     set MFBSI_DIR=%BASESYS%\LOGS\%JESSERVERNAME%
     set MFBSIEOP_CMD=ENABLE
     set MFBSIEOP_CSV=ENABLE
     set MFBSIEOP_HTM=ENABLE
     set MFBSIEOP_XML=ENABLE
rem  *
rem  * Set Behavior and Trace Flags for GETJOBDD
rem  *   Position=12345678/12345678
     set JDDFLAGS=nnnWnnnn/YYnnnnnn
rem  *
     set MAINFRAME_FLOATING_POINT=true
     set COBIDY=%BASEAPP%\COBIDY
     set COBPATH=.;%BASEAPP%\LOADLIB;%BASESYS%\LOADLIB;%SimoLIBR%
     set LIBPATH=.;%BASEAPP%\LOADLIB;%BASESYS%\LOADLIB;%SimoLIBR%
     set TXDIR=%BASESYS%\LOADLIB;%MIFOBASE%
     set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%
rem  *
rem  * If not already set then set the PATH for Micro Focus Directories
     if "%SIMOPATH%" == "Y" goto JUMPPATH
     if "%MIFOSYS1%" == "EDEV" goto JUMPEDEV
     if "%MIFOSYS1%" == "VCBL" goto JUMPVCBL
     if "%MIFOSYS1%" == "ESTU" goto JUMPESTU
     if "%MIFOSYS1%" == "EMFE" goto JUMPEMFE
:JUMPEDEV
     set path=%BASESYS%\LOADLIB;%MIFOEDEV%\bin;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
     set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOEDEV%\CPYLIB
     set MIFOBASE=%MIFOEDEV%
     goto JUMPPATH
:JUMPVCBL
     set path=%MIFOVCBL%\bin;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
     set MIFOBASE=%MIFOVCBL%
     goto JUMPPATH
:JUMPESTU
     set MIFOBASE=%MIFOESTU%\Base
     set MIFOBIN=%MIFOBASE%\bin
     set path=%BASESYS%\LOADLIB;%MIFOBASE%;%MIFOBIN%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
     set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOBASE%\SOURCE
     goto JUMPPATH
:JUMPEMFE
     set MIFOBASE=%MIFOEMFE%\Base
     set MIFOBIN=%MIFOBASE%\bin
     set path=%BASESYS%\LOADLIB;%MIFOBASE%;%MIFOBIN%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
     set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOBASE%\SOURCE
     goto JUMPPATH
rem  *
:JUMPPATH
     set SIMOPATH=Y
rem  *
     set USERCLASS=%BASELIB1%\LOADLIB
     set CLASSPATH=.
     set CLASSPATH=%CLASSPATH%;%JAVABASE%
     set CLASSPATH=%CLASSPATH%;%JAVABASE%\lib
     set CLASSPATH=%CLASSPATH%;\%USERCLASS%\simpacks
     set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\simotcat\WEB-INF\classes
     set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\simotcat\WEB-INF\classes\simpacks
     if "%MIFOSYS1%" == "ESTU" set CLASSPATH=%CLASSPATH%;%MIFOBIN%
     if "%MIFOSYS1%" == "EDEV" set CLASSPATH=%CLASSPATH%;%MIFOEDEV%
     if "%MIFOSYS1%" == "VCBL" set CLASSPATH=%CLASSPATH%;%MIFOVCBL%
     if "%MIFOSYS1%" == "VCBL" set CLASSPATH=%CLASSPATH%;%MIFOVCBL%\mfcobol.jar
rem  *
     set JobStatus=0000
     call SimoNOTE "* Settings CmdName ENV1BASE.cmd, Version 14.03.28, %MIFOSYS1%"
     call SimoNOTE "* BaseAPP ..... %BASEAPP%"
rem *      call SimoNOTE "* MFBSIDIR .... %MFBSI_DIR% "
     call SimoNOTE "* MIFOSYS1 is %MIFOSYS1% "
     call SimoNOTE "* MIFOBASE is %MIFOBASE% "
     call SimoNOTE "* SIMOLIBR is %SIMOLIBR% "

Table of Contents Previous Section Next Section Display and Log Messages

The following is a listing of the contents of the (SIMONOTE.cmd) command file.

@echo OFF
rem  * *******************************************************************
rem  *               SIMONOTE.CMD - a Windows Command File               *
rem  *         This program is provided by SimoTime Technologies         *
rem  *            (C) Copyright 1987-2016 All Rights Reserved            *
rem  *              Web Site URL:   http://www.simotime.com              *
rem  *                    e-mail:   helpdesk@simotime.com                *
rem  * *******************************************************************
rem  *
rem  * Text    - Display message on screen and write to a log file.
rem  * Author  - SimoTime Technologies
rem  *
rem  * This script may be called from other scripts and expects a single
rem  * parameter enclosed in double quotes. The double quotes will be
rem  * removed. Before writing to the log file a date and time stamp
rem  * will be inserted in front of the message text.
rem  *
rem  * Note: The tilde (~) removes leading/trailing double-quotes.
rem  *
if "%SimoNOTE%" == "" set SimoNOTE=c:\SimoLIBR\LOGS\SimoTime.LOG
echo %date% %time% %~1>> %SimoNOTE%
echo %~1

Table of Contents Previous Section Next Section Technical Details

This section provides information about additional components required or referenced in this sample suite of programs or test case.

Table of Contents Previous Section Next Section Record Structure for the Test File

The following COBOL Copy Member (SRT080B1.cpy) defines the record structure for the test files used in this suite of jobs.

      *****************************************************************
      *               SRT080B1.CPY - a COBOL Copy File                *
      * Copy File to define record structure for ASCII/EBCDIC Testing *
      *         Copyright (C) 1987-2017 SimoTime Technologies         *
      *                     All Rights Reserved                       *
      *              Provided by SimoTime Technologies                *
      *        Our e-mail address is: helpdesk@simotime.com           *
      *     Also, visit our Web Site at http://www.simotime.com       *
      *****************************************************************
       01  SRT080-RECORD.
           05  SRT080-ENTRY-SEQ        PIC X(3).
           05  FILLER                  PIC X.
           05  SRT080-CHARACTER        PIC X.
           05  FILLER                  PIC X.
           05  SRT080-EBC-HEX-CODE     PIC X(2).
           05  FILLER                  PIC X.
           05  SRT080-EBC-BIN-CODE     PIC X(9).
           05  FILLER                  PIC X.
           05  SRT080-ASC-HEX-CODE     PIC X(2).
           05  FILLER                  PIC X.
           05  SRT080-ASC-BIN-CODE     PIC X(9).
           05  FILLER                  PIC X(49).
      *
      ***  SRT080B1 - End-of-Copy File - - - - - - - - - - - SRT080B1 *
      *****************************************************************
      *

1. SRT080-ENTRY-SEQ - this is a three (3) digit field that contains the sequence of entry number (or record number) when the file was created.
2. SRT080-CHARACTER - This is a one (1) character field that contains the display text that would be a letter, number or special character.
3. SRT080-EBC-HEX-CODE - This is a two (2) byte field that contains the EBCDIC hexadecimal notation for the character. For example, the upper-case letter "A" would be x'C1'.
4. SRT080-EBC-BIN-CODE - This is a nine (9) byte field that contains the EBCDIC binary notation for the character. For example, the upper-case letter "A" would be '1100 0001' (the embedded space is for ease of viewing).
5. SRT080-ASC-HEX-CODE - This is a two (2) byte field that contains the ASCII hexadecimal notation for the character. For example, the upper-case letter "A" would be x'41'.
6. SRT080-ASC-BIN-CODE - This is a nine (9) byte field that contains the ASCII binary notation for the character. For example, the upper-case letter "A" would be '0100 0001' (the embedded space is for ease of viewing).

 

The following shows a sample record the letter "A".

000 ...1....:....2....:....3....:....4....:....5....:....6....:....7.
001 A C1 1100 0001 41 0100 0001

Table of Contents Previous Section Next Section Summary

The purpose of this suite of programs is to provide examples for sorting files in a Mainframe environment or a Windows environment using Micro Focus technologies. This document may be used as a tutorial for new programmers or as a quick reference for experienced programmers.

In the world of programming there are many ways to solve a problem. This document and the links to other documents are intended to provide a greater awareness of the Data Management and Application Processing alternatives.

The documentation and software were developed and tested on systems that are configured for a SimoTime environment based on the hardware, operating systems, user requirements and security requirements. Therefore, adjustments may be needed to execute the jobs and programs when transferred to a system of a different architecture or configuration.

SimoTime Services has experience in moving or sharing data or application processing across a variety of systems. For additional information about SimoTime Services or Technologies please send an e-mail to: helpdesk@simotime.com or call 415 883-6565. We appreciate hearing from you.

Table of Contents Previous Section Next Section Software Agreement and Disclaimer

Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Technologies. Once the fee is received by SimoTime the latest version of the software, documentation or training material will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Technologies.

SimoTime Technologies makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Technologies shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.

Table of Contents Previous Section Next Section Downloads and Links

This section includes links to documents with additional information that are beyond the scope and purpose of this document. The first group of documents may be available from a local system or via an internet connection, the second group of documents will require an internet connection.

Note: A SimoTime License is required for the items to be made available on a local system or server.

Table of Contents Previous Section Next Section Current Server or Internet Access

The following links may be to the current server or to the Internet.

Link to Internet   Link to Server   Explore the non-Relational Data Connection for more examples of accessing methodologies and coding techniques for Data Files and VSAM Data Sets.

Link to Internet   Link to Server   Explore how to sort ASCII-encoded Files into an EBCDIC collating sequence or EBCDIC-encoded files into an ASCII collating sequence using the ALTSEQ function of the Mainframe SORT or the ALTSEQ function of the Micro Focus SORT.

Link to Internet   Link to Server   Explore The ASCII and EBCDIC Translation Tables. These tables are provided for individuals that need to better understand the bit structures and differences of the encoding formats.

Link to Internet   Link to Server   Explore The File Status Return Codes to interpret the results of accessing VSAM data sets and/or QSAM files.

Table of Contents Previous Section Next Section Internet Access Required

The following links will require an internet connect.

This suite of programs and documentation is available for download. Link to an Evaluation zPAK Option that includes the program members, documentation and control files.

A good place to start is The SimoTime Home Page for access to white papers, program examples and product information. This link requires an Internet Connection

Explore The Micro Focus Web Site for more information about products and services available from Micro Focus. This link requires an Internet Connection.

Table of Contents Previous Section Next Section Glossary of Terms

Link to Internet   Link to Server   Explore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers.

Table of Contents Previous Section Next Section Comments or Feedback

This document was created and is copyrighted and maintained by SimoTime Technologies.

If you have any questions, suggestions, comments or feedback please call or send an e-mail to: helpdesk@simotime.com

We appreciate hearing from you.

Table of Contents Previous Section Next Section Company Overview

SimoTime Technologies was founded in 1987 and is a privately owned company. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. Our customers include small businesses using Internet technologies to corporations using very large mainframe systems.

Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems. We specialize in preparing applications and the associated data that are currently residing on a single platform to be distributed across a variety of platforms.

Preparing the application programs will require the transfer of source members that will be compiled and deployed on the target platform. The data will need to be transferred between the systems and may need to be converted and validated at various stages within the process. SimoTime has the technology, services and experience to assist in the application and data management tasks involved with doing business in a multi-system environment.

Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com


Return-to-Top
The SORT Program, Simple Examples
Copyright © 1987-2017
SimoTime Technologies and Services
All Rights Reserved
When technology complements business
http://www.simotime.com