Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Arranging output records using DFSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Arranging output records using DFSORT
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 Moderator


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

PostPosted: Sun Sep 25, 2005 10:02 pm    Post subject:
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    Post subject: Re: Arranging output records using DFSORT
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 Moderator


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

PostPosted: Tue Sep 27, 2005 12:47 am    Post subject:
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:

http://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: 239
Location: Cincinnati OH USA

PostPosted: Tue Sep 27, 2005 8:06 am    Post subject:
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    Post subject: Re: Arranging output records using DFSORT
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 Moderator


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

PostPosted: Fri Sep 30, 2005 12:57 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Incorrect output when trying to add n... monica1 PL/I & Assembler 10 Fri Jan 13, 2017 5:02 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us