Sort AlphaNumeric to Numeric



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

Sort AlphaNumeric to Numeric

Postby mvtc19 » Thu Nov 01, 2018 12:21 am

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      
********************
 
mvtc19
 
Posts: 3
Joined: Tue Oct 30, 2018 2:46 am
Has thanked: 2 times
Been thanked: 0 time

Re: Sort AlphaNumeric to Numeric

Postby Robert Sample » Thu Nov 01, 2018 4:23 am

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!
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Sort AlphaNumeric to Numeric

Postby NicC » Sat Nov 03, 2018 3:02 pm

Neither Sort nor Easytrieve are JCL. Moving to Easytrieve.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post