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

Retain header values and insert into detail records


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

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Tue Mar 09, 2010 2:30 am
Reply with quote

I am at April 2006 "E" level of DFSORT.

I have a file with date/time records preceding detail records. When each date record appears, I want to hold the value and prefix it onto the following detail records. When next date appears, save that value.

Input - FB, 133 file
'ACTL' literal in col 2 is a date record; date/time value in col 7-24

I'd like to specify up to 16 values for including volume detail records to match on column 2; example B1, B5, etc.

Output - FB, 151
saved date value inserted into col 1-18
detail record appended in col 19

Sample input (truncated):
Code:
 SHFT 13.30.00 13.45.00 DAYS=ALL                              HOUSTON, TX.                               SYSTEM ID: MVS
 ACTL 05 MAR 10 13.30.00  05 MAR 10 13.45.00                                                                           
                                                                                                                       
 BASED ON REC TYPE/# RECS/# SAMPLES/REC HOURS:  74-5/11/1/0.25                                                         
  DEV  VOLUME  XTNT  ----STATUS---     %     I/O   -CACHE HIT RATE-  --------DASD I/O RATE--------  ASYNC  -------% HIT
  NUM  SERIAL  POOL  CACHE  DASDFW    I/O   RATE   READ   DFW   CFW  STAGE DFWBP   ICL   BYP OTHER   RATE  TOTAL   READ
 ----  ------  ----  ------ ------  -----  -----  ----- ----- -----  ----- ----- ----- ----- -----  -----  -----  -----
 B501  NMHLOG  0001  ACTIVE ACTIVE   99.9    6.0    5.8   0.1     0      0     0     0     0     0      0   99.9  100.0
 B502  SMST57  0001  ACTIVE ACTIVE    0.1      0      0     0     0      0     0     0     0     0      0   66.7   66.7
 B50D  SMST58  0001  ACTIVE ACTIVE      0      0      0     0     0      0     0     0     0     0      0   50.0   50.0
Sample Output (truncated)
Code:
05 MAR 10 13.30.00 B501  NMHLOG  0001  ACTIVE ACTIVE   99.9    6.0    5.8   0.1     0      0     0     0     0     0      0   99.9
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Mar 09, 2010 4:15 am
Reply with quote

Bill Dennis,

The following DFSORT/ICETOOL JCl will give you the desired results

Code:

//STEP0100 EXEC PGM=ICETOOL                                           
//TOOLMSG  DD SYSOUT=*                                               
//DFSMSG   DD SYSOUT=*                                               
//IN       DD DSN=Your input FB 133 file,DISP=SHR                   
//OUT      DD SYSOUT=*                                               
//TOOLIN   DD *                                                       
  SPLICE FROM(IN) TO(OUT) ON(152,8,CH) WITHALL WITH(1,151) USING(CTL1)
//CTL1CNTL DD *                                                       
  SORT FIELDS=COPY                                                   
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(152:SEQNUM,8,ZD)),                 
  IFTHEN=(WHEN=(2,4,CH,EQ,C'ACTL'),OVERLAY=(152:SEQNUM,8,ZD,7,20)),   
  IFTHEN=(WHEN=NONE,OVERLAY=(160:SEQNUM,8,ZD,                         
          152:152,8,ZD,SUB,160,8,ZD,M11,LENGTH=8))                   
                                                                     
  OUTFIL FNAMES=OUT,BUILD=(160,18,1,133),                             
  INCLUDE=(2,4,CH,EQ,C'B501',OR,
           ...all your include codes
           2,4,CH,EQ,C'B522')                                         

//*
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Tue Mar 09, 2010 8:07 pm
Reply with quote

Thanks, Kolusu. I was trying an example in "Tips" but the GROUP option didn't work at my code level.
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 Mar 09, 2010 11:48 pm
Reply with quote

Bill,

I'm curious - why is your site several years behind in DFSORT service?
April, 2006 was a long time ago. We've had several functional PTFs since then. Does your site just not bother with service?
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Wed Mar 10, 2010 2:54 am
Reply with quote

This is a system that is expected to go away soon so software upgrade activities have ceased.
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: Wed Mar 10, 2010 3:00 am
Reply with quote

Ah, I see. And is it one of those that has been planned to go away for decades, but never does? icon_smile.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Mar 10, 2010 3:09 am
Reply with quote

Scheduled for de-commissioning as soon as the 3270 screens are production-ready on the WinBox. . . sterb050.gif

d
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Mar 10, 2010 4:38 am
Reply with quote

Hi Frank,

most sites I'm involved in have
Code:
ICE201I E RECORD TYPE IS F - DATA STARTS IN POSITION 1
installed but what can I say, I like to keep my job.


Gerry
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: Wed Mar 10, 2010 4:54 am
Reply with quote

Gerry,

What level of z/OS are those sites running? Are they reluctant to move to something "new" in general? Do you know why they stay backlevel?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Mar 10, 2010 5:19 am
Reply with quote

Frank,

the sites are running on z/os 1.9.

It could be because I work for an outsourcing place and unless it's requested by the customer then it will not get done.


Gerry
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: Wed Mar 10, 2010 5:45 am
Reply with quote

z/OS 1.9 will be going out of service this September. Perhaps when they move to z/OS 1.10 or higher (assuming they do) they will include the newer DFSORT PTFs.
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top