sortingmainframejcl

Mainframe Programming Sorting, OUTFIL REMOVECC,NODETAIL


The program basically sorts the datas. And remove the duplications considering the range of 5-29 characters.

I am trying to sort some values on Mainframe accordingly :

SORT FIELDS=(5,24,CH,A,45,10,CH,A)

when I use

OUTFIL REMOVECC,NODETAIL,

What I receive before and after running that command is different. Can you please inform me about the function of OUTFIL REMOVECC, NODETAIL command?

Here are the outputs before and after I run this command using the same input:

INPUT: enter image description here

OUTPUT(Without Outfil Removecc, nodetail):

enter image description here

OUTPUT (with Outfil Removecc, nodetail command):

enter image description here

I want to know the functionality of a command on Mainframe.


Solution

  • Both NODETAIL and REMOVECC parms are used for reports.

    REMOVECC can be used to remove the ANSI control characters(page eject,blank line...) from a report.

    NODETAIL - Specifies that data records are not to be output for the reports produced for this OUTFIL group. With NODETAIL, the data records are completely processed with respect to input fields, statistics, counts, sections breaks, and so on, but are not written to the OUTFIL data set and are not included in line counts for determining the end of a page. You can use NODETAIL to summarize the data records without actually showing them.

    You specified the parms but did not specify anything for generating the stats.

    So try adding the following and it will count the key fields

    //SYSIN    DD *                                                
      SORT FIELDS=(5,24,CH,A,45,10,CH,A)                           
      OUTFIL REMOVECC,NODETAIL,                                    
      SECTIONS=(5,24,45,10,                                        
      TRAILER3=('KEY |',5,24,'|',45,10,' HAS COUNT OF :',COUNT))   
    /*