Without wishing to appear a "die hard defender of DFSORT" :-) I would 
expect DFSORT's I/O speed to be better than that of a program (even with 
decent Sequential File tuning). But that quite possibly DOESN'T matter.

Cheers, Martin

Martin Packer,
zChampion, Principal Systems Investigator,
Worldwide Banking Center of Excellence, IBM

+44-7802-245-584

email: [email protected]

Twitter / Facebook IDs: MartinPacker
Blog: 
https://www.ibm.com/developerworks/mydeveloperworks/blogs/MartinPacker



From:   Lizette Koehler <[email protected]>
To:     [email protected]
Date:   14/09/2014 14:52
Subject:        Re: SORT JCL
Sent by:        IBM Mainframe Discussion List <[email protected]>



I agree that Sort may not be as easy as a programming language.

For example, with REXX you can do LEFT(var,5,'0') or RIGHT(var,5,'0') and 
that will place zeros up to the number of positions.
In Unix, or Perl, or COBOL, or EASYTRIEVE, or Assembler, not hard to do.

I have found many places that are using SORT where a simple program will 
do the job nicely.

Also, depending on where the data is coming from, it might be possible for 
that process to pad out the data.  If the data is being extracted from a 
data base (DB2, IMS, etc...) - maybe that data could be extracted with the 
padding.

All that is just wild conjecture.  As the OP did not provide a lot of 
detail other than - how do I use sort to make this happen.  I always find 
it helpful if the postings could contain just a little bit more detail in 
order to get a more targeted answer from the list.

Lizette


> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[email protected]] On
> Behalf Of Ron Thomas
> Sent: Saturday, September 13, 2014 10:29 PM
> To: [email protected]
> Subject: SORT JCL
> 
> Hi.
> 
> We have a file which is of the below layout LRECL = 80
> 
> 0001 - 4043
> 4045 - 4060
> 4062 - 4108
> 4110 - 4700
> 4705 - 4706
> 4708    88888
> 4714
> 4719
> 4723
> 67777
> 
> Here we need to make this file as below by appending zeros to the 1'st 
byte of each
> number only if the length of the number is 4 . This being a parmcard if 
someone
> entered a 5 digit then no need to apend a zero . Could some one let me 
know how to
> do the same in sort?
> 
> 00001 - 04043
> 04045 - 04060
> 04062 - 04108
> 04110 - 04700
> 04705 - 04706
> 04708   888888
> 04714
> 04719
> 04723
> 677777
> 
> Thanks
> Ron T

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN



Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to