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 

Need help in formatting input data..

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


Joined: 07 Apr 2004
Posts: 41
Topics: 30

PostPosted: Thu Jun 07, 2007 6:35 pm    Post subject: Need help in formatting input data.. Reply with quote

Dont know how to do this. I am looking for help from experts like you.

Sample input data is:


Code:

XFFI01GP   10.08
XFFI01GP    1.68
XFFI02GP    7.23
XFFI02GP    1.26
XFFI01GP   11.36
XFFI02GP    8.27
XFFI01GP   11.5
XFFI02GP    8.04
XFFI01GP    9.63
XFFI02GP    1.46
XFFI02GP    6.39


The numbers are actually stored in character format with leading spaces.
Requirement is to sum the data at this column (SUM FIELDS on first column).

The output data needed:

XFFI01GP 44.25
XFFI02GP 33.05 (Please note actual output is 32.65 but this column must be summed on time format; 59 seconds is the max value).



Thanks in advance
Back to top
View user's profile Send private message
CICS Guy
Intermediate


Joined: 30 Apr 2007
Posts: 292
Topics: 3

PostPosted: Thu Jun 07, 2007 7:27 pm    Post subject: Reply with quote

Programaticly, simple....Utility, what have you got to chose from....Depending upon the release level sort can get what you want....Which sort do you have?
Back to top
View user's profile Send private message
kris_madras
Beginner


Joined: 07 Apr 2004
Posts: 41
Topics: 30

PostPosted: Thu Jun 07, 2007 8:39 pm    Post subject: Reply with quote

Syncsort but it doesn;t matter whether you are using SYNC or DFSORT.. these two have lot of common features.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Jun 08, 2007 3:45 am    Post subject: Reply with quote

Quote:

Syncsort but it doesn;t matter whether you are using SYNC or DFSORT.. these two have lot of common features.

kris_madras,

It DOES Matter , just look at the questions in the utilities forum. If you are not running syncsort z/OS 1.2 and higher most of the features from DFSORT does not work.

Does the deicmal vary or is it a constant position. Also you mentioned that it is time format. how is the input reprensed when it is higher than an hour? And what if the summed values exceeds 60? Do you need to convert it hours?

Run a sample sort job and see the first line of the sysout which gives you the version of sort you are running.

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


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Fri Jun 08, 2007 4:25 am    Post subject: Reply with quote

deleted by dbzTHEdinosaur, post did not help the discussion.
_________________
Dick Brenholtz
American living in Varel, Germany


Last edited by dbzTHEdinosauer on Sat Jun 09, 2007 6:12 am; edited 1 time in total
Back to top
View user's profile Send private message
kris_madras
Beginner


Joined: 07 Apr 2004
Posts: 41
Topics: 30

PostPosted: Fri Jun 08, 2007 1:10 pm    Post subject: Reply with quote

kolusu wrote:

Does the deicmal vary or is it a constant position. Also you mentioned that it is time format. how is the input reprensed when it is higher than an hour? And what if the summed values exceeds 60? Do you need to convert it hours?


Kolusu



The decimal point is always fixed in the input data. The requirement I am working is to extract the Job execution times. The job execution time should include restarted timings.

for example if you have data for one day

JOBNAME JOB EXEC TIME
-------------------------------------
XFFI01GP 1.34
XFFI01GP 2.45 (Restarted job), These 2 jobs ran on same day.

I need the output in the format

XFFI01GP 4.19 (Actual sum is 3.79 but when converted to time it is 4.19 , > 60 seconds)

The JOB exec time when read from SYSOUT, I am getting leading spaces and with decimal values...

I need your help in adding the JOB EXEC TIME column values for matching job names (SUM FIELDS for duplicate job names)


Hope this also answers Author dbzTHEdinosauer
Back to top
View user's profile Send private message
kris_madras
Beginner


Joined: 07 Apr 2004
Posts: 41
Topics: 30

PostPosted: Fri Jun 08, 2007 1:16 pm    Post subject: Reply with quote

Kolusu,
I forgot to answet the SYNSORT version we are running in our work shop. Apologies..

SYNCSORT FOR Z/OS 1.2.2.1R
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Fri Jun 08, 2007 1:39 pm    Post subject: Reply with quote

deleted by dbzTHEdinosaur, post did not help the discussion.
_________________
Dick Brenholtz
American living in Varel, Germany


Last edited by dbzTHEdinosauer on Sat Jun 09, 2007 6:12 am; edited 3 times in total
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Jun 08, 2007 1:41 pm    Post subject: Reply with quote

kris_madras,

Code:

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*                           
//SORTIN   DD *                                 
XFFI01GP    1.34                                 
XFFI01GP    2.45                                 
//SORTOUT  DD SYSOUT=*                           
//SYSIN    DD *                                 
  INREC FIELDS=(01,09,10,7,UFF,PD,LENGTH=4)     
  SORT FIELDS=(1,8,CH,A)                         
  SUM FIELDS=(10,4,PD)                           
  OUTREC IFTHEN=(WHEN=INIT,                     
        OVERLAY=(10:10,4,PD,EDIT=(IIIIIT.TT))), 
         IFTHEN=(WHEN=(17,2,ZD,GT,60),           
        OVERLAY=(10:+1,ADD,10,6,FS,EDIT=(IIIIIT),
                 17:17,2,ZD,SUB,+60,EDIT=(TT))) 
                                                 
/*


Hope this helps...

Cheers

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


Joined: 07 Apr 2004
Posts: 41
Topics: 30

PostPosted: Fri Jun 08, 2007 4:20 pm    Post subject: Reply with quote

Great!!.. Its working..Thank you for all your support...Kolusu never mind could you post SYNCSORT links to get an idea of 'UFF' command. I have Syncsort documents but older one..
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 -> Utilities 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