IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Arranging output records using DFSORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
hyuzen

New User


Joined: 10 Jul 2005
Posts: 58

PostPosted: Sun Sep 25, 2005 2:26 am
Reply with quote

Hi all,

Here are some records selected from system log:

05263 00:07:08 JOB04420 IEF403I PGRP101J STARTED - TIME=00.07
05263 00:12:03 JOB04420 IEF404I PGRP101J ENDED - TIME=00.12
05263 00:10:04 JOB04422 IEF403I PGRP102J STARTED - TIME=00.10
05263 00:19:28 JOB04422 IEF404I PGRP102J ENDED - TIME=00.19



Can I get the output below using DFSORT ?

05263 PGRP101J JOB04420 00.07 00.12
05263 PGRP102J JOB04422 00.10 00.19


You can assume assume each coloums like A to E, for examle
A:05263 :Date
B:PGRP101J :Jobname
C:JOB04420 :Jobid
D:00.07 : Started time
E:00.12 : Ended time

Thanks in advance,
Hyuzen
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sun Sep 25, 2005 10:02 pm
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG   DD  SYSOUT=*
//IN DD DSN=...  input file (FB/n)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT DD DSN=...  output file (FB/40)
//TOOLIN   DD    *
* Reformat START records to:
* Date   Jobname   Jobid     stime        seqnum
* Reformat END records to:
*                                   etime seqnum
COPY FROM(IN) TO(T1) USING(CTL1)
* Splice START and END records together for each seqnum to get:
* Date   Jobname   Jobid     stime  etime seqnum
* Remove seqnum.
SPLICE FROM(T1) TO(OUT) ON(41,8,ZD) WITH(35,5) USING(CTL2)
//CTL1CNTL DD *
  INREC IFTHEN=(WHEN=(42,2,CH,EQ,C'ST'),
     BUILD=(1,5,8:33,8,18:16,8,28:57,5,41:SEQNUM,8,ZD)),
        IFTHEN=(WHEN=(42,2,CH,EQ,C'EN'),
     BUILD=(35:55,5,41:SEQNUM,8,ZD))
/*
//CTL2CNTL DD *
  OUTFIL FNAMES=OUT,BUILD=(1,40)
/*
Back to top
View user's profile Send private message
hyuzen

New User


Joined: 10 Jul 2005
Posts: 58

PostPosted: Tue Sep 27, 2005 12:33 am
Reply with quote

Hi Frank,

I would like to thank you very much for your worthy response.

Although I'm a beginner at using ICETOOL, I'm trying to overcome the errors when I met.

I work at OS/390 V2R10.0 and I'm not sure whether it supports SPLICE operator of DFSORT R14 ICETOOL or not? If not what can I do ? Even I checked bookmanager but I did not get any piece of information about Splice operator.

Thanks in advance,
Hyuzen
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Sep 27, 2005 12:47 am
Reply with quote

The SPLICE operator of DFSORT's ICETOOL was first supported with DFSORT R14 PTF UQ90053 which has been available since Feb, 2003. So unless your DFSORT R14 is very much behind in service, you should be able to use SPLICE. If you find that you cannot use SPLICE, ask your System Programmer to install DFSORT R14 PTF UQ95213 (Dec, 2004). This will give you all of the available DFSORT/ICETOOL functions.

Quote:
Even I checked bookmanager but I did not get any piece of information about Splice operator.


That's a little hard to understand, as SPLICE is fully documented in "z/OS DFSORT Application Programming Guide" and introduced in "z/OS DFSORT: Getting Started". See:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA10/6.13?DT=20050222160456
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 419
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Tue Sep 27, 2005 8:06 am
Reply with quote

It's been awhile since I've seen a syslog, but what happens when the job name is less than 8 characters? Is it padded with trailing blanks to keep 'STARTED' and 'ENDED' in the same positions?



Dave
Back to top
View user's profile Send private message
hyuzen

New User


Joined: 10 Jul 2005
Posts: 58

PostPosted: Fri Sep 30, 2005 12:29 am
Reply with quote

Dear Frank,

I've asked system programmer to apply PTF UQ90053 then I will be able to use SPLICE operator with other enhancements...

Thank you very much.

Hyuzen
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Sep 30, 2005 12:57 am
Reply with quote

Hyuzen,

Try to get the system programmer to apply PTF UQ95213 - that will give you additional new DFSORT functions such as IFTHEN and OVERLAY, as well as SPLICE, etc. (UQ90053 is a prereq for UQ95213.)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
Search our Forums:

Back to Top