JCL & Sorting Examples
When technology complements business   Syntax Checking & Execution
Copyright © 1987-2008 SimoTime Enterprises, LLC  All Rights Reserved http://www.simotime.com

 
Introduction Version 05.09.13
 
  Programming Objectives
  Programming Input and Output
 
  Unsorted File Created by IEBGENER
  Sorted File using EBCDIC Collating Sequence
  Sorted "Case Insensitive" File using EBCDIC Collating Sequence
  Programming Requirements
  Programming Overview
  JCL, Sort for EBCDIC Environment with EBCDIC Sequencing
  JCL, How to Syntax Check without Execution
  JCL, Sort for ASCII Environment with ASCII Sequencing
  JCL, Sort for ASCII Environment with EBCDIC Sequencing
  Summary
 
  Software Agreement and Disclaimer
  Downloads and Links to Similar Pages of Interest
  Glossary of Terms
  Comments or Suggestions
  About SimoTime

Introduction
[Next] [Previous] [Table-of-Contents]

This suite of programs provides JCL members that are coded to perform similar tasks when sorting EBCDIC or ASCII-encoded data files. The first JCL member provides an example of doing a "case-insensitive" sort for EBCDIC-encoded data files. The second JCL member uses the TYPRUN=SCAN parameter on the JOB statement which causes the member not to actually execute but does scan the JCL statements for proper syntax. The third JCL member provides an example of doing a "case-insensitive" sort for ASCII-encoded data files. The fourth JCL member provides an example of doing a "case-insensitive" sort for ASCII-encoded data files and will cause the numbers to be sorted after the letters (similar to the EBCDIC collating sequence).

The SORT steps will show how to use sort to copy a file or sort a file. An example of a case insensitive sort using an alternate collating table is included.

The JCL members were originally written and used on an "MVS (or z/OS) Mainframe. Currently, the JCL members may be used as MVS batch jobs on an IBM mainframe or with Micro Focus Mainframe Express (MFE) or Micro Focus ES/MTO Batch Facility on a PC with Windows. For more information about the Micro Focus technologies refer to http://www.microfocus.com).

Programming Objectives
(Next) (Previous) (Table-of-Contents)

This example illustrates the following functions.

1. Demonstrate how to syntax mainframe JCL.
2. Demonstrate how to use the IEBGENER utility program to create and populate a file.
3. Demonstrate how to use the SORT program to copy a file.
4. Demonstrate how to use the SORT program to sort a file.
5. Demonstrate how to use the SORT program to sort a file using an alternate sorting sequence (this example does a "case insensitive" sort).
6. Demonstrate how to use IEFBR14 to delete files.

Programming Input and Output
(Next) (Previous) (Table-of-Contents)

The input for this example is included in the job stream. The output of the individual steps will create simple sequential files. The input for the examples is included in the job stream. The output of the individual steps will create simple sequential files.

Unsorted File Created by IEBGENER
(Next) (Previous) (Table-of-Contents)

The following is an example of a sequential file (JCLSCAN1.DAT) created by one of the job steps that use IEBGENER. The relative record sequence number is in positions 73-80. This file will be used by the following sort steps.

....:....1....:....2....:....3....:....4....:....5....:....6....:....7....:....8
026 AAA Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000010
025 bbb Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000020
024 CCC Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000030
023 ddd Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000040
022 EEE Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000050
021 fff Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000060
020 GGG Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000070
019 hhh Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000080
018 III Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000090
017 jjj Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000100
016 KKK Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000110
015 lll Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000120
014 MMM Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000130
036 999 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000140
035 888 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000150
034 777 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000160
033 666 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000170
032 555 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000180
031 444 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000190
030 333 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000200
029 222 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000210
028 111 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000220
026 000 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000230
013 nnn Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000240
012 OOO Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000250
011 ppp Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000260
010 QQQ Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000270
009 rrr Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000280
008 SSS Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000290
007 ttt Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000300
006 UUU Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000310
005 vvv Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000320
004 WWW Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000330
003 xxx Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000340
002 YYY Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000350
001 zzz Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000360

Sorted File using EBCDIC Collating Sequence
(Next) (Previous) (Table-of-Contents)

The following is an example of the sequential file (JCLSCAN4.DAT) created as a result of sorting with the standard EBCDIC collating sequence (notice the lower case letters come first followed by upper case and then numbers). The sorting is done on positions 5-7.

....:....1....:....2....:....3....:....4....:....5....:....6....:....7....:....8
025 bbb Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000020
023 ddd Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000040
021 fff Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000060
019 hhh Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000080
017 jjj Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000100
015 lll Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000120
013 nnn Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000240
011 ppp Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000260
009 rrr Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000280
007 ttt Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000300
005 vvv Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000320
003 xxx Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000340
001 zzz Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000360
026 AAA Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000010
024 CCC Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000030
022 EEE Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000050
020 GGG Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000070
018 III Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000090
016 KKK Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000110
014 MMM Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000130
012 OOO Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000250
010 QQQ Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000270
008 SSS Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000290
006 UUU Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000310
004 WWW Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000330
002 YYY Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000350
026 000 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000230
028 111 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000220
029 222 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000210
030 333 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000200
031 444 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000190
032 555 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000180
033 666 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000170
034 777 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000160
035 888 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000150
036 999 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000140

Sorted "Case Insensitive" File using EBCDIC Collating Sequence
(Next) (Previous) (Table-of-Contents)

The following is an example of the sequential file (JCLSCAN5.DAT) created as a result of using an EBCDIC collating sequence with the ALTSEQ function and a table that provides for case insensitivity(notice the lower case letters and upper case letters are grouped together followed by the numbers) . The sorting is done on positions 5-7. This is the collating sequence generally preferred by human beings.

....:....1....:....2....:....3....:....4....:....5....:....6....:....7....:....8
026 AAA Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000010
025 bbb Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000020
024 CCC Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000030
023 ddd Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000040
022 EEE Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000050
021 fff Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000060
020 GGG Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000070
019 hhh Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000080
018 III Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000090
017 jjj Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000100
016 KKK Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000110
015 lll Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000120
014 MMM Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000130
013 nnn Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000240
012 OOO Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000250
011 ppp Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000260
010 QQQ Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000270
009 rrr Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000280
008 SSS Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000290
007 ttt Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000300
006 UUU Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000310
005 vvv Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000320
004 WWW Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000330
003 xxx Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000340
002 YYY Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000350
001 zzz Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000360
026 000 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000230
028 111 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000220
029 222 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000210
030 333 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000200
031 444 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000190
032 555 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000180
033 666 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000170
034 777 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000160
035 888 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000150
036 999 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000140

Programming Requirements
(Next) (Previous) (Table-of-Contents)

This suite of samples programs will run on the following platforms.

1. Executes on Windows/NT, Windows/XP or Windows Server 2003 using Micro Focus Mainframe Express or ES/MTO with the Batch Facility
2. May be ported to run on the UNIX platforms supported by Micro Focus and ES/MTO with the Batch Facility.

Programming Overview
(Next) (Previous) (Table-of-Contents)

The following is a block diagram of the steps within the job.

   
JCLSCNJ1J1
jcl
          The JCL or CMD member for running the application.
   
 
           
   
IEFBR14
utl
          Delete any previously created data files.
   
 
           
   
IEBGENER
utl
     
     
     
JCLSCAN1
data
      Create and populate a sequential file
   
 
           
JCLSCAN1
data
     
     
     
SORT
utl
     
     
     
JCLSCAN2
data
      Use the SORT utility program to copy a file.
Note: this step will not sort the file.
   
 
           
JCLSCAN2
data
     
     
     
SORT
utl
     
     
     
JCLSCAN3
data
      Use the SORT utility program to sort a file.
   
 
           
   
End-of-Job
EOJ
           

Sort for EBCDIC Environment with EBCDIC Sequencing
[Next] [Previous] [Table-of-Contents]

The following is the mainframe JCL (JCLSCNJ1.JCL) required to execute the process defined by the JCL member. Notice the TYPRUN=SCAN parameter on the JOB card continuation is a comment and there is no comma in the last position of the JOB statement to indicate a continuation.

Notice STEP0050 contains a table for changing the sorting sequence. This will create an output file using a sort that is insensitive to upper and lower case. Since the table redefines the sort sequencing changes at the binary level this step will only work correctly in an EBCDIC encoded data file.

The JOB and DD statements will need to be modified for different mainframe environments.

//JCLSCNJ1 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//*             TYPRUN=SCAN
//* *******************************************************************
//*                   This program is provided by:                    *
//*                    SimoTime Enterprises, LLC                      *
//*           (C) Copyright 1987-2006 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text   - Demonstrate the use of IEBGENER, SORT and TYPRUN=SCAN.
//* Author - SimoTime Enterprises
//* Date   - January 24, 1996
//*
//* This JCL member will show basic functions of JCL.
//*
//* STEP0010 uses the IEBGENER utility program to create a file.
//* STEP0020 uses the SORT utility to copy the file on positions 1-3.
//* STEP0030 uses the SORT utility to sort the file on positions 1-3.
//* STEP0040 uses the SORT utility to sort the file on positions 5-7.
//* STEP0050 uses the SORT utility to sort the file on positions 5-7.
//*          This step uses an alternate collating table to sort with
//*          case insensitivity.
//*
//* CAUTION! Since the ALTSEQ is defined at the binary (or hexadecimal)
//*          level this step will only work for EBCDIC-encoded files.
//*
//* *******************************************************************
//* This step does the housekeeping to delete files created by a
//* previous run of this job.
//*
//BLOWAWAY EXEC PGM=IEFBR14,COND=(0,LT)
//DD1      DD  DSN=SIMOTIME.DATA.JCLSCAN1,
//             UNIT=SYSDA,SPACE=(TRK,0),DISP=(MOD,DELETE,DELETE),
//             DCB=(RECFM=FB,LRECL=80)
//DD2      DD  DSN=SIMOTIME.DATA.JCLSCAN2,
//             UNIT=SYSDA,SPACE=(TRK,0),DISP=(MOD,DELETE,DELETE),
//             DCB=(RECFM=FB,LRECL=80)
//DD3      DD  DSN=SIMOTIME.DATA.JCLSCAN3,
//             UNIT=SYSDA,SPACE=(TRK,0),DISP=(MOD,DELETE,DELETE),
//             DCB=(RECFM=FB,LRECL=80)
//DD4      DD  DSN=SIMOTIME.DATA.JCLSCAN4,
//             UNIT=SYSDA,SPACE=(TRK,0),DISP=(MOD,DELETE,DELETE),
//             DCB=(RECFM=FB,LRECL=80)
//DD5      DD  DSN=SIMOTIME.DATA.JCLSCAN5,
//             UNIT=SYSDA,SPACE=(TRK,0),DISP=(MOD,DELETE,DELETE),
//             DCB=(RECFM=FB,LRECL=80)
//*
//* *******************************************************************
//* This step uses IEBGENER to copy a sequential file. SYSIN is DD *
//* with thirty-six (36) records.
//*
//STEP0010 EXEC PGM=IEBGENER,COND=(0,LT)
//SYSPRINT DD  SYSOUT=*
//*.:....1....:....2....:....3....:....4....:....5....:....6....:....7. ..:....8
//SYSUT1   DD  *
003 AAA Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000010
001 bbb Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000020
002 CCC Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000030
007 ddd Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000040
006 EEE Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000050
004 fff Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000060
005 GGG Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000070
003 hhh Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000080
001 III Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000090
002 jjj Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000100
007 KKK Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000110
006 lll Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000120
004 MMM Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000130
009 999 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000140
010 888 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000150
008 777 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000160
009 666 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000170
010 555 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000180
008 444 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000190
009 333 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000200
010 222 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000210
008 111 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000220
008 000 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000230
003 nnn Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000240
001 OOO Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000250
002 ppp Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000260
007 QQQ Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000270
006 rrr Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000280
004 SSS Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000290
005 ttt Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000300
003 UUU Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000310
001 vvv Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000320
002 WWW Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000330
007 xxx Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000340
006 YYY Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000350
004 zzz Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000360
/*
//SYSUT2   DD  DSN=SIMOTIME.DATA.JCLSCAN1,DISP=(,CATLG,DELETE),
//             UNIT=SYSDA,SPACE=(TRK,(50,10),RLSE),
//             DCB=(RECFM=FB,LRECL=80)
//*
//* *******************************************************************
//* This step uses SORT to copy a sequential file. SYSIN is DD *
//* with inline control specifications.
//*
//STEP0020 EXEC PGM=SORT
//SYSPRINT DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//SORTIN   DD  DSN=SIMOTIME.DATA.JCLSCAN1,DISP=SHR
//SORTOUT  DD  DSN=SIMOTIME.DATA.JCLSCAN2,DISP=(,CATLG,DELETE),
//             UNIT=SYSDA,SPACE=(TRK,(50,10),RLSE),
//             DCB=(RECFM=FB,LRECL=80)
//SYSIN DD *
 SORT FIELDS=COPY
/*
//*
//* *******************************************************************
//* This step uses the sort utility to sort the file created in a
//* previous step. SYSIN is DD * with inline control specifications.
//*
//STEP0030 EXEC PGM=SORT
//SYSPRINT DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//SORTIN   DD  DSN=SIMOTIME.DATA.JCLSCAN2,DISP=SHR
//SORTOUT  DD  DSN=SIMOTIME.DATA.JCLSCAN3,DISP=(,CATLG,DELETE),
//             UNIT=SYSDA,SPACE=(TRK,(50,10),RLSE),
//             DCB=(RECFM=FB,LRECL=80)
//SYSIN DD *
 SORT  FIELDS=(1,3,CH,A)
 END
/*
//*
//* *******************************************************************
//* This step uses the sort utility to sort on the secondary field in
//* positions 5-7. This shows the collating sequence for upper and
//* lower case letters and mixed alphameric fields.
//*
//STEP0040 EXEC PGM=SORT
//SYSPRINT DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//SORTIN   DD  DSN=SIMOTIME.DATA.JCLSCAN1,DISP=SHR
//SORTOUT  DD  DSN=SIMOTIME.DATA.JCLSCAN4,DISP=(,CATLG,DELETE),
//             UNIT=SYSDA,SPACE=(TRK,(50,10),RLSE),
//             DCB=(RECFM=FB,LRECL=80)
//SYSIN DD *
 SORT  FIELDS=(5,3,CH,A)
/*
//*
//* *******************************************************************
//* This step uses the sort utility to sort on the secondary field in
//* positions 5-7. This shows the affect of using an alternate
//* sequencing table for upper-lower case letters and mixed alpha-
//* numeric fields. The result is a case insensitive sorting sequence.
//*
//STEP0050 EXEC PGM=SORT
//SYSPRINT DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//SORTIN   DD  DSN=SIMOTIME.DATA.JCLSCAN1,DISP=SHR
//SORTOUT  DD  DSN=SIMOTIME.DATA.JCLSCAN5,DISP=(,CATLG,DELETE),
//             UNIT=SYSDA,SPACE=(TRK,(50,10),RLSE),
//             DCB=(RECFM=FB,LRECL=80)
//SYSIN DD *
 SORT  FIELDS=(5,3,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)
/*
//*

The JCL Member for Syntax Checking
[Next] [Previous] [Table-of-Contents]

The following is the mainframe JCL (JCLSCNJ2.JCL) required to scan but not execute the process defined by the JCL member. Notice the TYPRUN=SCAN parameter on the JOB continuation statement and the comma in the last position of the JOB card to indicate a continuation..

Notice STEP0050 contains a table for changing the sorting sequence. This will create an output file using a sort that is insensitive to upper and lower case. Since the table redefines the sort sequencing changes at the binary level this step will only work correctly in an ASCII encoded data file.

The JOB and DD statements will need to be modified for different mainframe environments.

//JCLSCNJ2 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1,
//             TYPRUN=SCAN
//* *******************************************************************
//*                   This program is provided by:                    *
//*                    SimoTime Enterprises, LLC                      *
//*           (C) Copyright 1987-2006 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text   - Demonstrate the use of TYPRUN=SCAN on the JOB statement.
//* Author - SimoTime Enterprises
//* Date   - January 24, 1996
//*
//* This JCL member will show basic functions of JCL.
//*
//* JCLSCNJ2 has the TYPRUN=SCAN on the JOB statement and simply scans
//*          the JCL for proper syntax. It does not execute. The
//*          TYPRUN=SCAN is supported on the mainframe and with
//*          Micro Focus MFE and ES/MTO Batch Facility.
//*
//* *******************************************************************
//* This step does the housekeeping to delete files created by a
//* previous run of this job.
//*
//BLOWAWAY EXEC PGM=IEFBR14,COND=(0,LT)
//DD1      DD  DSN=SIMOTIME.DATA.JCLSCAN1,
//             UNIT=SYSDA,SPACE=(TRK,0),DISP=(MOD,DELETE,DELETE),
//             DCB=(RECFM=FB,LRECL=80)
//DD2      DD  DSN=SIMOTIME.DATA.JCLSCAN2,
//             UNIT=SYSDA,SPACE=(TRK,0),DISP=(MOD,DELETE,DELETE),
//             DCB=(RECFM=FB,LRECL=80)
//DD3      DD  DSN=SIMOTIME.DATA.JCLSCAN3,
//             UNIT=SYSDA,SPACE=(TRK,0),DISP=(MOD,DELETE,DELETE),
//             DCB=(RECFM=FB,LRECL=80)
//DD4      DD  DSN=SIMOTIME.DATA.JCLSCAN4,
//             UNIT=SYSDA,SPACE=(TRK,0),DISP=(MOD,DELETE,DELETE),
//             DCB=(RECFM=FB,LRECL=80)
//DD5      DD  DSN=SIMOTIME.DATA.JCLSCAN5,
//             UNIT=SYSDA,SPACE=(TRK,0),DISP=(MOD,DELETE,DELETE),
//             DCB=(RECFM=FB,LRECL=80)
//*
//* *******************************************************************
//* This step has a syntax error to see if the TYPRUN=SCAN will catch
//* the error.
//*
//DUMBSTEP EXEC PGM=IEFBR14
//DUMBFILE DD  DSN=SIMOTIME.DATA.DUMBFILE,DISP=(MOD,DELETE,DELETE),
//             UNIT=SYSDA,SPACE=(TRK,0),
//             DCB=(RECFM=YUK,LRECL=80)
//*

Sort for ASCII Environment with ASCII Sequencing
[Next] [Previous] [Table-of-Contents]

The following is the mainframe JCL (JCLSCNJ3.JCL) required to execute the process defined by the JCL member. Notice the TYPRUN=SCAN parameter on the JOB card continuation is a comment and there is no comma in the last position of the JOB statement to indicate a continuation.

Notice STEP0050 contains a table for changing the sorting sequence. This will create an output file using a sort that is insensitive to upper and lower case. Since the table redefines the sort sequencing changes at the binary level this step will only work correctly in an ASCII encoded data file.

The JOB and DD statements will need to be modified for different mainframe environments.

//JCLSCNJ3 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//*             TYPRUN=SCAN
//* *******************************************************************
//*                   This program is provided by:                    *
//*                    SimoTime Enterprises, LLC                      *
//*           (C) Copyright 1987-2006 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text   - Demonstrate the use of IEBGENER, SORT and TYPRUN=SCAN.
//* Author - SimoTime Enterprises
//* Date   - January 24, 1996
//*
//* This JCL member will show basic functions of JCL.
//*
//* STEP0010 uses the IEBGENER utility program to create a file.
//* STEP0020 uses the SORT utility to copy the file on positions 1-3.
//* STEP0030 uses the SORT utility to sort the file on positions 1-3.
//* STEP0040 uses the SORT utility to sort the file on positions 5-7.
//* STEP0050 uses the SORT utility to sort the file on positions 5-7.
//*          This step uses an alternate collating table to sort with
//*          case insensitivity.
//*
//* CAUTION! Since the ALTSEQ is defined at the binary (or hexadecimal)
//*          level this step will only work for ASCII-encoded files.
//*
//* *******************************************************************
//* This step does the housekeeping to delete files created by a
//* previous run of this job.
//*
//BLOWAWAY EXEC PGM=IEFBR14,COND=(0,LT)
//DD1      DD  DSN=SIMOTIME.DATA.JCLSCAN1,
//             UNIT=SYSDA,SPACE=(TRK,0),DISP=(MOD,DELETE,DELETE),
//             DCB=(RECFM=FB,LRECL=80)
//DD2      DD  DSN=SIMOTIME.DATA.JCLSCAN2,
//             UNIT=SYSDA,SPACE=(TRK,0),DISP=(MOD,DELETE,DELETE),
//             DCB=(RECFM=FB,LRECL=80)
//DD3      DD  DSN=SIMOTIME.DATA.JCLSCAN3,
//             UNIT=SYSDA,SPACE=(TRK,0),DISP=(MOD,DELETE,DELETE),
//             DCB=(RECFM=FB,LRECL=80)
//DD4      DD  DSN=SIMOTIME.DATA.JCLSCAN4,
//             UNIT=SYSDA,SPACE=(TRK,0),DISP=(MOD,DELETE,DELETE),
//             DCB=(RECFM=FB,LRECL=80)
//DD5      DD  DSN=SIMOTIME.DATA.JCLSCAN5,
//             UNIT=SYSDA,SPACE=(TRK,0),DISP=(MOD,DELETE,DELETE),
//             DCB=(RECFM=FB,LRECL=80)
//*
//* *******************************************************************
//* This step uses IEBGENER to copy a sequential file. SYSIN is DD *
//* with thirty-six (36) records.
//*
//STEP0010 EXEC PGM=IEBGENER,COND=(0,LT)
//SYSPRINT DD  SYSOUT=*
//*.:....1....:....2....:....3....:....4....:....5....:....6....:....7. ..:....8
//SYSUT1   DD  *
003 AAA Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000010
001 bbb Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000020
002 CCC Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000030
007 ddd Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000040
006 EEE Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000050
004 fff Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000060
005 GGG Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000070
003 hhh Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000080
001 III Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000090
002 jjj Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000100
007 KKK Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000110
006 lll Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000120
004 MMM Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000130
009 999 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000140
010 888 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000150
008 777 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000160
009 666 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000170
010 555 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000180
008 444 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000190
009 333 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000200
010 222 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000210
008 111 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000220
008 000 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000230
003 nnn Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000240
001 OOO Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000250
002 ppp Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000260
007 QQQ Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000270
006 rrr Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000280
004 SSS Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000290
005 ttt Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000300
003 UUU Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000310
001 vvv Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000320
002 WWW Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000330
007 xxx Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000340
006 YYY Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000350
004 zzz Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000360
/*
//SYSUT2   DD  DSN=SIMOTIME.DATA.JCLSCAN1,DISP=(,CATLG,DELETE),
//             UNIT=SYSDA,SPACE=(TRK,(50,10),RLSE),
//             DCB=(RECFM=FB,LRECL=80)
//*
//* *******************************************************************
//* This step uses SORT to copy a sequential file. SYSIN is DD *
//* with inline control specifications.
//*
//STEP0020 EXEC PGM=SORT
//SYSPRINT DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//SORTIN   DD  DSN=SIMOTIME.DATA.JCLSCAN1,DISP=SHR
//SORTOUT  DD  DSN=SIMOTIME.DATA.JCLSCAN2,DISP=(,CATLG,DELETE),
//             UNIT=SYSDA,SPACE=(TRK,(50,10),RLSE),
//             DCB=(RECFM=FB,LRECL=80)
//SYSIN DD *
 SORT FIELDS=COPY
/*
//*
//* *******************************************************************
//* This step uses the sort utility to sort the file created in a
//* previous step. SYSIN is DD * with inline control specifications.
//*
//STEP0030 EXEC PGM=SORT
//SYSPRINT DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//SORTIN   DD  DSN=SIMOTIME.DATA.JCLSCAN2,DISP=SHR
//SORTOUT  DD  DSN=SIMOTIME.DATA.JCLSCAN3,DISP=(,CATLG,DELETE),
//             UNIT=SYSDA,SPACE=(TRK,(50,10),RLSE),
//             DCB=(RECFM=FB,LRECL=80)
//SYSIN DD *
 SORT  FIELDS=(1,3,CH,A)
 END
/*
//*
//* *******************************************************************
//* This step uses the sort utility to sort on the secondary field in
//* positions 5-7. This shows the collating sequence for upper and
//* lower case letters and mixed alphameric fields.
//*
//STEP0040 EXEC PGM=SORT
//SYSPRINT DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//SORTIN   DD  DSN=SIMOTIME.DATA.JCLSCAN1,DISP=SHR
//SORTOUT  DD  DSN=SIMOTIME.DATA.JCLSCAN4,DISP=(,CATLG,DELETE),
//             UNIT=SYSDA,SPACE=(TRK,(50,10),RLSE),
//             DCB=(RECFM=FB,LRECL=80)
//SYSIN DD *
 SORT  FIELDS=(5,3,CH,A)
/*
//*
//* *******************************************************************
//* This step uses the sort utility to sort on the secondary field in
//* positions 5-7. This shows the affect of using an alternate
//* sequencing table for upper-lower case letters and mixed alpha-
//* numeric fields. The result is a case insensitive sorting sequence.
//*
//STEP0050 EXEC PGM=SORT
//SYSPRINT DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//SORTIN   DD  DSN=SIMOTIME.DATA.JCLSCAN1,DISP=SHR
//SORTOUT  DD  DSN=SIMOTIME.DATA.JCLSCAN5,DISP=(,CATLG,DELETE),
//             UNIT=SYSDA,SPACE=(TRK,(50,10),RLSE),
//             DCB=(RECFM=FB,LRECL=80)
//SYSIN DD *
 SORT  FIELDS=(5,3,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)
/*
//*

Sort for ASCII Environment with EBCDIC Sequencing
[Next] [Previous] [Table-of-Contents]

The following is the mainframe JCL (JCLSCNJ4.JCL) required to execute the process defined by the JCL member. Notice the TYPRUN=SCAN parameter on the JOB card continuation is a comment and there is no comma in the last position of the JOB statement to indicate a continuation.

Notice STEP0050 contains a table for changing the sorting sequence. This will create an output file using a sort that is insensitive to upper and lower case. Since the table redefines the sort sequencing changes at the binary level this step will only work correctly in an ASCII encoded data file. Since the numbers are also changed to follow the letters (i.e. alpha-characters) this will create a file with EBCDIC sequence in an ASCII environment.

The JOB and DD statements will need to be modified for different mainframe environments.

//JCLSCNJ4 JOB SIMOTIME,ACCOUNT,CLASS=1,MSGCLASS=0,NOTIFY=CSIP1
//*             TYPRUN=SCAN
//* *******************************************************************
//*                   This program is provided by:                    *
//*                    SimoTime Enterprises, LLC                      *
//*           (C) Copyright 1987-2006 All Rights Reserved             *
//*             Web Site URL:   http://www.simotime.com               *
//*                   e-mail:   helpdesk@simotime.com                 *
//* *******************************************************************
//*
//* Text   - Demonstrate the use of IEBGENER, SORT and TYPRUN=SCAN.
//* Author - SimoTime Enterprises
//* Date   - January 24, 1996
//*
//* This JCL member will show basic functions of JCL.
//*
//* STEP0010 uses the IEBGENER utility program to create a file.
//* STEP0020 uses the SORT utility to copy the file on positions 1-3.
//* STEP0030 uses the SORT utility to sort the file on positions 1-3.
//* STEP0040 uses the SORT utility to sort the file on positions 5-7.
//* STEP0050 uses the SORT utility to sort the file on positions 5-7.
//*          This step uses an alternate collating table to sort with
//*          case insensitivity. The table will also cause the numbers
//*          to sort after the letters for the ASCII environment.
//*
//* CAUTION! Since the ALTSEQ is defined at the binary (or hexadecimal)
//*          level this step will only work for ASCII-encoded files.
//*
//* *******************************************************************
//* This step does the housekeeping to delete files created by a
//* previous run of this job.
//*
//BLOWAWAY EXEC PGM=IEFBR14,COND=(0,LT)
//DD1      DD  DSN=SIMOTIME.DATA.JCLSCAN1,
//             UNIT=SYSDA,SPACE=(TRK,0),DISP=(MOD,DELETE,DELETE),
//             DCB=(RECFM=FB,LRECL=80)
//DD2      DD  DSN=SIMOTIME.DATA.JCLSCAN2,
//             UNIT=SYSDA,SPACE=(TRK,0),DISP=(MOD,DELETE,DELETE),
//             DCB=(RECFM=FB,LRECL=80)
//DD3      DD  DSN=SIMOTIME.DATA.JCLSCAN3,
//             UNIT=SYSDA,SPACE=(TRK,0),DISP=(MOD,DELETE,DELETE),
//             DCB=(RECFM=FB,LRECL=80)
//DD4      DD  DSN=SIMOTIME.DATA.JCLSCAN4,
//             UNIT=SYSDA,SPACE=(TRK,0),DISP=(MOD,DELETE,DELETE),
//             DCB=(RECFM=FB,LRECL=80)
//DD5      DD  DSN=SIMOTIME.DATA.JCLSCAN5,
//             UNIT=SYSDA,SPACE=(TRK,0),DISP=(MOD,DELETE,DELETE),
//             DCB=(RECFM=FB,LRECL=80)
//*
//* *******************************************************************
//* This step uses IEBGENER to copy a sequential file. SYSIN is DD *
//* with THIRTY-SIX (36) records.
//*
//STEP0010 EXEC PGM=IEBGENER,COND=(0,LT)
//SYSPRINT DD  SYSOUT=*
//*.:....1....:....2....:....3....:....4....:....5....:....6....:....7. ..:....8
//SYSUT1   DD  *
003 AAA Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000010
001 bbb Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000020
002 CCC Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000030
007 ddd Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000040
006 EEE Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000050
004 fff Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000060
005 GGG Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000070
003 hhh Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000080
001 III Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000090
002 jjj Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000100
007 KKK Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000110
006 lll Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000120
004 MMM Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000130
009 999 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000140
010 888 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000150
008 777 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000160
009 666 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000170
010 555 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000180
008 444 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000190
009 333 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000200
010 222 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000210
008 111 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000220
008 000 Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000230
003 nnn Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000240
001 OOO Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000250
002 ppp Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000260
007 QQQ Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000270
006 rrr Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000280
004 SSS Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000290
005 ttt Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000300
003 UUU Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000310
001 vvv Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000320
002 WWW Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000330
007 xxx Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000340
006 YYY Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000350
004 zzz Bytes 1-3 are primary, Bytes 5-7 are secondary                  00000360
/*
//SYSUT2   DD  DSN=SIMOTIME.DATA.JCLSCAN1,DISP=(,CATLG,DELETE),
//             UNIT=SYSDA,SPACE=(TRK,(50,10),RLSE),
//             DCB=(RECFM=FB,LRECL=80)
//*
//* *******************************************************************
//* This step uses SORT to copy a sequential file. SYSIN is DD *
//* with inline control specifications.
//*
//STEP0020 EXEC PGM=SORT
//SYSPRINT DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//SORTIN   DD  DSN=SIMOTIME.DATA.JCLSCAN1,DISP=SHR
//SORTOUT  DD  DSN=SIMOTIME.DATA.JCLSCAN2,DISP=(,CATLG,DELETE),
//             UNIT=SYSDA,SPACE=(TRK,(50,10),RLSE),
//             DCB=(RECFM=FB,LRECL=80)
//SYSIN DD *
 SORT FIELDS=COPY
/*
//*
//* *******************************************************************
//* This step uses the sort utility to sort the file created in a
//* previous step. SYSIN is DD * with inline control specifications.
//*
//STEP0030 EXEC PGM=SORT
//SYSPRINT DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//SORTIN   DD  DSN=SIMOTIME.DATA.JCLSCAN2,DISP=SHR
//SORTOUT  DD  DSN=SIMOTIME.DATA.JCLSCAN3,DISP=(,CATLG,DELETE),
//             UNIT=SYSDA,SPACE=(TRK,(50,10),RLSE),
//             DCB=(RECFM=FB,LRECL=80)
//SYSIN DD *
 SORT  FIELDS=(1,3,CH,A)
 END
/*
//*
//* *******************************************************************
//* This step uses the sort utility to sort on the secondary field in
//* positions 5-7. This shows the collating sequence for upper and
//* lower case letters and mixed alphameric fields.
//*
//STEP0040 EXEC PGM=SORT
//SYSPRINT DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//SORTIN   DD  DSN=SIMOTIME.DATA.JCLSCAN1,DISP=SHR
//SORTOUT  DD  DSN=SIMOTIME.DATA.JCLSCAN4,DISP=(,CATLG,DELETE),
//             UNIT=SYSDA,SPACE=(TRK,(50,10),RLSE),
//             DCB=(RECFM=FB,LRECL=80)
//SYSIN DD *
 SORT  FIELDS=(5,3,CH,A)
/*
//*
//* *******************************************************************
//* This step uses the sort utility to sort on the secondary field in
//* positions 5-7. This shows the affect of using an alternate
//* sequencing table for upper-lower case letters and mixed alpha-
//* numeric fields. The result is a case insensitive sorting sequence.
//*
//STEP0050 EXEC PGM=SORT
//SYSPRINT DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//SORTIN   DD  DSN=SIMOTIME.DATA.JCLSCAN1,DISP=SHR
//SORTOUT  DD  DSN=SIMOTIME.DATA.JCLSCAN5,DISP=(,CATLG,DELETE),
//             UNIT=SYSDA,SPACE=(TRK,(50,10),RLSE),
//             DCB=(RECFM=FB,LRECL=80)
//SYSIN DD *
 SORT  FIELDS=(5,3,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,
              30F0,31F1,32F2,33F3,34F4,35F5,36F6,37F7,38F8,39F9)
/*
//*

Summary
Next] [Previous] [Table-of-Contents]

The purpose of this document is to assist as a tutorial for new programmers or as a quick reference for experienced programmers. As always, it is the programmer's responsibility to thoroughly test all programs.

Software Agreement and Disclaimer
(Next) (Previous) (Table-of-Contents)

Permission to use, copy, modify and distribute this software for any commercial purpose requires a fee to be paid to SimoTime Enterprises. Once the fee is received by SimoTime the latest version of the software 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 Enterprises.

Permission to use, copy, modify and distribute this software for a non-commercial purpose and without fee is hereby granted, 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 Enterprises.

SimoTime Enterprises makes no warranty or representations about the suitability of the software for any purpose. It is provided "AS IS" without any express or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Enterprises 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.

Downloads and Links to Similar Pages of Interest
(Next) (Previous) (Table-of-Contents)

You may download this example at http://www.simotime.com/sim4dzip.htm#JCLBasicFunctionsZip as a Z-Pack. The Z-Packs provide individual programming examples, documentation and test data files in a single package. The Z-Packs are usually in zip format to reduce the amount of time to download. Please view the complete list of SimoTime Z-Pack Examples at http://www.simotime.com/sim4dzip.htm.

Note: You must be attached to the Internet to download a Z-Pack or view the list.

Check out  SORT, Simple Examples for Mainframe and Micro Focus  for more examples of programs that 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 an IBM Mainframe System with ZOS.

Check out the  Print Mailing Labels  for a sort example that is embedded in a multi-step job.

Check out  The COBOL Connection  for more examples of mainframe COBOL coding techniques and sample code.

Check out  The JCL Connection  for more mainframe JCL examples.

Check out  The SQL Connection  for more examples of mainframe Relational Data Base management and accessing techniques with sample code.

Check out  The VSAM - QSAM Connection  for more examples of mainframe VSAM and QSAM accessing techniques and sample code.

This document provides a quick summary of the  File Status Key  for VSAM data sets and QSAM files.

Check out  The SimoTime Library  for a wide range of topics for Programmers, Project Managers and Software Developers.

To review all the information available on this site start at  The SimoTime Home Page .

Glossary of Terms
(Next) (Previous) (Table-of-Contents)

Check out  The SimoTime Glossary  for a list of terms and definitions used in the documents provided by SimoTime.

Comments or Suggestions
(Next) (Previous) (Table-of-Contents)

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

About SimoTime Enterprises, LLC
[Next] [Previous] [Table-of-Contents]

Founded in 1987, SimoTime Enterprises is a privately owned, Limited Liability Corporation located in Novato, California. 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. This includes the smallest thin client using the Internet and the very large mainframe systems. There is more to making the Internet work for your company's business than just having a nice looking WEB site. It is about combining the latest technologies and existing technologies with practical business experience. It's about the business of doing business and looking good in the process. 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. 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
Copyright © 1987-2008  SimoTime Enterprises, LLC  All Rights Reserved
When technology complements business