Posted: Mon Jan 20, 2003 11:27 pm Post subject: Low values to spaces
Hi All,
I want to convert fields with low values to spaces in a file (10,000 records). Is it better do it in the JCL rather than doing it in the program? Please advice.
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Tue Jan 21, 2003 12:42 am Post subject:
Praveen,
There are many of ways of doing it. The easiest would be using utilities like DFSORT, FILE-AID. The following DFSORT jcl will give you the desired results.There is a new feature TRAN=ALTSEQ with the latest PTF which will replace low values with spaces.Be careful with this kind of replacement as it will mess up packed or binary fields that have hex zeros in the first couple of bytes.
Joined: 02 Dec 2002 Posts: 45 Topics: 1 Location: Sydney, NSW, Australia
Posted: Tue Jan 21, 2003 12:52 am Post subject:
Six of one half dozen of another.
My first thought was to use a utility (such as FileAid) to convert the data in a separate step, but the Inspect statement (assuming you are using Cobol) is pretty slick when both strings are constants (i.e. x'00' and x'40') .
DFSORT options TRAN=UTOL and TRAN=LTOU are also available to change uppercase to lowercase or lowercase to uppercase, respectively. For more information, see the "Change uppercase to lowercase or lowercase to uppercase" Smart DFSORT Trick at:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum