Page 1 of 1

Sort AlphaNumeric to Numeric

PostPosted: Thu Nov 01, 2018 12:21 am
by mvtc19
Hi,

I have an input file that have a length of 15, data type numeric.

----+----1----+----2
********************
1234513961848      
********************
 


My EZT code is evaluating it as below, appending trailing zeroes.

----+----1----+----2
********************
123451396184800      
********************
 


How do I sort my input file so that it'll be read as

----+----1----+----2
********************
001234513961848      
********************
 

Re: Sort AlphaNumeric to Numeric

PostPosted: Thu Nov 01, 2018 4:23 am
by Robert Sample
Assuming "EZT code" means "Easytrieve code", WHY DO YOU WANT US TO GUESS HOW YOU CODED THE INPUT? We should not have to guess what you did -- if you cannot tell us, we cannot help you. It appears -- and this is only a guess -- that you are defining the Easytrieve variable as 15 bytes, the data is 13 bytes so Easytrieve is appending 2 zeroes to the value to replace the blanks. Have you read in the manual about how Easytrieve handles short variables or blanks in variables? If not -- start there. If you have, have you applied what you read to your problem?

And how exactly does your title "Sort AlphaNumeric to Numeric" apply to your problem statement? It does not even appear you are sorting anything at this point!

Re: Sort AlphaNumeric to Numeric

PostPosted: Sat Nov 03, 2018 3:02 pm
by NicC
Neither Sort nor Easytrieve are JCL. Moving to Easytrieve.