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
 

 

Retain header values and insert into detail records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Retain header values and insert into detail records
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    Post subject: Reply to: Retain header values and insert into detail record
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    Post subject:
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 Moderator


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

PostPosted: Tue Mar 09, 2010 11:48 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Wed Mar 10, 2010 3:00 am    Post subject:
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

Site Director


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

PostPosted: Wed Mar 10, 2010 3:09 am    Post subject: Reply to: Retain header values and insert into detail record
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: 1703
Location: Australia

PostPosted: Wed Mar 10, 2010 4:38 am    Post subject:
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 Moderator


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

PostPosted: Wed Mar 10, 2010 4:54 am    Post subject:
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: 1703
Location: Australia

PostPosted: Wed Mar 10, 2010 5:19 am    Post subject:
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 Moderator


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

PostPosted: Wed Mar 10, 2010 5:45 am    Post subject:
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    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 SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
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 CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Overlaying one set of charater values... Kevin Lindsley SYNCSORT 7 Sat Nov 05, 2016 3:21 am


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