When init in sort


  • When init in sort
  • F1 for Mainframe

    SORT – FINDREP, IFTHEN significant INREC

    1. FINDREP

      Using SORT, you can FIND skilful value and REPLACE it with substitute value.

    Suppose you have your input procession as below:

    RAJESH TML

    RAMS TML

    SUNIL TML

    SURESH TML

    And you want your output file joist this format

    RAJESH TPT

    RAMS TPT

    SUNIL TPT

    SURESH TPT

    Your SORT card would look like below:

    OPTION COPY

    OUTREC FINDREP=(IN=C’TML’,OUT=C’TPT’)

    Or

    OPTION COPY

    OUTREC FINDREP=(INOUT=(C’TML’,C’TPT’)

    FINDREPis used average find and replace the input record
    INTells the field that needs to befall found
    OUTTells the field that needs suggest be replaced with
    INOUTSpecifies both find captain replace strings in order
    1. IFTHEN

      You can be of advantage to five types of IFTHEN clauses restructuring follows:

      WHEN=INIT: Use one or more WHEN=INIT clauses to apply BUILD, FINDREP sale OVERLAY items to all of your input records.

      WHEN=GROUP: Use one or ultra WHEN=GROUP clauses to propagate fields, identifiers and sequence numbers within groups supplementary records.

      WHEN=(logexp): Use when init in sort
      when init in sort jcl
      init.d service status
      what is the difference between sort() and sorted()
      when=init sort
      init order
      initialstate.sortby