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 

Add times in Cartesian format using Icetool

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


Joined: 19 Apr 2006
Posts: 7
Topics: 4

PostPosted: Mon Apr 24, 2006 9:36 pm    Post subject: Add times in Cartesian format using Icetool Reply with quote

Hi guys,

I have the below input format :

Code:
PHUGR3CD 04:00:00 00:01:00
PHUGR46D          00:03:00
PHUGR52E          00:07:00
PHUGR58D          00:01:00
PHUMSG1D          00:02:00


I need output like :

Code:
PHUGR3CD 04:00:00 04:01:00
PHUGR46D 04:01:00 04:04:00
PHUGR52E 04:04:00 04:11:00
PHUGR58D 04:11:00 04:12:00
PHUMSG1D 04:12:00 04:14:00


hours added can go beyond 24. not a problem.

We have DFSORT 14.0 version where I suppose keywords like : OVERLAY or BUILD are not allowed. it's giving syntax errors.

do you have any other way ?

Thanks,
Chirag
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Apr 25, 2006 9:28 am    Post subject: Reply with quote

chirag2901,

Here is DFSORT JCL which will give you the desired results without using BUILD and OVERLAY features.

Code:

//STEP0100 EXEC PGM=SORT                                 
//SYSOUT   DD SYSOUT=*                                   
//SORTIN   DD *                                         
PHUGR3CD 04:00:00 00:01:00                               
PHUGR46D          00:03:00                               
PHUGR52E          00:07:00                               
PHUGR58D          00:01:00                               
PHUMSG1D          00:02:00                               
//SORTOUT  DD DSN=&T1,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
//SYSIN    DD *                                         
  SORT FIELDS=COPY                                       
  INREC FIELDS=(01,30,                                   
                +3600,MUL,10,02,FS,ADD,                 
                +0060,MUL,13,02,FS,ADD,                 
                +0001,MUL,16,02,FS,ADD,                 
                +3600,MUL,19,02,FS,ADD,                 
                +0060,MUL,22,02,FS,ADD,                 
                +0001,MUL,25,02,FS,M11,LENGTH=8,         
                X,                                       
                +3600,MUL,19,02,FS,ADD,                 
                +0060,MUL,22,02,FS,ADD,                 
                +0001,MUL,25,02,FS,M11,LENGTH=8,         
                X,                                       
                SEQNUM,8,ZD,                             
                80:X)                                   
                                                         
  OUTFIL REMOVECC,NODETAIL,                             
  SECTIONS=(49,8,                                       
  TRAILER3=(1,30,                                       
            SUBTOTAL=(31,8,FS,M11,LENGTH=8),             
            39,42))                                     
/*   
//STEP0200 EXEC PGM=SORT                                     
//SYSOUT   DD SYSOUT=*                                       
//SORTIN   DD DSN=&T1,DISP=OLD                               
//SORTOUT  DD SYSOUT=*                                       
//SYSIN    DD *                                             
  SORT FIELDS=COPY                                           
  INREC FIELDS=(01,60,                                       
                31,08,ZD,SUB,40,8,ZD,M11,LENGTH=8)           
  OUTREC FIELDS=(01,09,                                     
                61,08,ZD,DIV,+3600,M11,LENGTH=8,X,           
                (61,08,ZD,MOD,+3600),DIV,+60,M11,LENGTH=8,X,
                61,8,ZD,MOD,+60,M11,LENGTH=8,X,             
                                                             
                31,08,ZD,DIV,+3600,M11,LENGTH=8,X,           
                (31,08,ZD,MOD,+3600),DIV,+60,M11,LENGTH=8,X,
                31,8,ZD,MOD,+60,M11,LENGTH=8)               
                                                             
  OUTFIL OUTREC=(01,09,                                     
                 10:10,8,ZD,M11,LENGTH=2,                   
                 12:C':',                                   
                 13:19,8,ZD,M11,LENGTH=2,                   
                 15:C':',                                   
                 16:28,8,ZD,M11,LENGTH=2,                   
                 X,                                         
                 19:37,8,ZD,M11,LENGTH=2,                   
                 21:C':',                                   
                 22:46,8,ZD,M11,LENGTH=2,                   
                 24:C':',                                   
                 25:55,8,ZD,M11,LENGTH=2)                   
/*                                                           


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
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Tue Apr 25, 2006 9:55 am    Post subject: Reply with quote

Quote:
We have DFSORT 14.0 version where I suppose keywords like : OVERLAY or BUILD are not allowed. it's giving syntax errors.


You can use OVERLAY and BUILD with DFSORT R14, but you need PTF UQ95213. This PTF has been available since Dec, 2004. Ask your System Programmer to install it. Better yet, ask your System Programmer to install DFSORT R14 PTF UK90006, so you'll get the April, 2006 functions as well (PARSE, JFY, SQZ), etc.

You can read about the April, 2006 functions at:

www.ibm.com/servers/storage/support/software/sort/mvs/peug/

You can read about the Dec, 2004 functions at:

www.ibm.com/servers/storage/support/software/sort/mvs/pdug/
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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