MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SORT utility for Siebel columns

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
SK
Beginner


Joined: 04 Feb 2004
Posts: 26
Topics: 3

PostPosted: Wed Mar 03, 2004 9:58 am    Post subject: SORT utility for Siebel columns Reply with quote

Hi,

I want to sort a COBOL file based on the Siebel column which is of type UTC date/time.(date and time combined). This column contain values like this 2003-11-12-10.14.36.000000

Can I do it using standard SORT utility like

SORT FIELDS=(1,26,CH,A)

Instead of CH do I need to use some other parameter value.

It would be great if someone can give any idea in this regard
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed Mar 03, 2004 10:01 am    Post subject: Reply with quote

Sk,

You are fine sorting the field as character.


Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
SK
Beginner


Joined: 04 Feb 2004
Posts: 26
Topics: 3

PostPosted: Wed Mar 03, 2004 2:21 pm    Post subject: Reply with quote

Kolusu,

Sort for the above mentioned column is not working correctly and the output is as follows:

2004-02-23-12.11.57.000000
2004-02-18-08.33.28.000000
2004-03-03-08.03.35.000000
2004-02-20-12.28.57.000000
2004-02-25-09.08.08.000000

Could you tell me whether i need to change some parameters or anything to sort it correctly.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed Mar 03, 2004 2:28 pm    Post subject: Reply with quote

Sk,

when you say it is not working properly, you need give more information.I just ran the job and it sorted correctly

Code:

//STEP0100  EXEC  PGM=SORT     
//SYSOUT    DD SYSOUT=*         
//SORTIN    DD *               
2004-02-23-12.11.57.000000     
2004-02-18-08.33.28.000000     
2004-03-03-08.03.35.000000     
2004-02-20-12.28.57.000000     
2004-02-25-09.08.08.000000     
//SORTOUT   DD SYSOUT=*         
//SYSIN    DD    *             
    SORT FIELDS=(1,26,CH,A)       
//*


The output is:
Code:

2004-02-18-08.33.28.000000
2004-02-20-12.28.57.000000
2004-02-23-12.11.57.000000
2004-02-25-09.08.08.000000
2004-03-03-08.03.35.000000


Just cut and paste the same job on to your machine and look at sortout in SDSF. you will find the results are sorted correctly

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Wed Mar 03, 2004 3:23 pm    Post subject: Reply with quote

I got the exact same results as Kolusu.

Maybe the start position for the field is not in byte 1?

This code will show the contents of the specified bytes:
Code:

//STEP0200  EXEC  PGM=ICETOOL                     
//TOOLMSG   DD SYSOUT=*                           
//SORTIN    DD DSN=dataset                                       
//DFSMSG    DD SYSOUT=*                           
//SHOW      DD SYSOUT=*                           
//TOOLIN   DD    *                               
    DISPLAY FROM(SORTIN) LIST(SHOW) ON(1,26,HEX) 
//*
Back to top
View user's profile Send private message
haatvedt
Beginner


Joined: 14 Nov 2003
Posts: 66
Topics: 0
Location: St Cloud, Minnesota USA

PostPosted: Thu Mar 04, 2004 3:50 pm    Post subject: Reply with quote

if the file is variable length, then the RDW (Record Descriptor Word) is included in the position field of the sort control cards. For example the first data byte is in position 5 as the length of the RDW is 4 bytes.
_________________
Chuck Haatvedt

email --> clastnameatcharterdotnet

(replace lastname, at, dot with appropriate
characters)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group