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

Want to sort a hsm-logfile. RECFM=FBA LRECL=121


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

New User


Joined: 30 Jul 2006
Posts: 14

PostPosted: Thu Sep 14, 2006 2:07 pm
Reply with quote

Hi

We want to sort a hsm-logfile. RECFM=FBA LRECL=121


The hsm-logfile contains many information but I only need the following informations:


First line: FUNC=MIGRATE L0->L1 TOVOL=HSM101 FRVOL=TSO001 JOBNM=JOBNM RC=00000 REAS=00000
Second line: TIMES: REQUEST RECEIVED=110145, STARTED=110145, ALLOCATED=110145, ENDED=110146.
Third line: DSN=USERID.Q.PROF DSORG=PO RECFM=FB




MIGRATE startet at position 16
DSN=XX startet at position 06

The sortout dataset should looks like so:
Only one line should be displayed for each MIGRATE:

FUNC=MIGRATE L0->L1 TOVOL=HSM101 FRVOL=TSO001 JOBNM=JOBNM RC=00000 REAS=00000 DSN=ACHTSR3.Q.PROF

We use DFSORT 1V5

Could anyone help me.

Roland
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: Thu Sep 14, 2006 8:59 pm
Reply with quote

So you want the the data from the MIGRATE record ending with REAS=00000, followed by the DSN=name field from the DSN= record?

Can the DSN record be identified just by looking for DSN= starting in position 6, or does it have to be identified in relation to the MIGRATE record?

You don't want anything from the TIMES record?

What is the RECFM and LRECL of the input file?

What is the position of the last byte you need from the MIGRATE record (that is where does REAS=00000 end)?
Back to top
View user's profile Send private message
Roland_Achtsnit

New User


Joined: 30 Jul 2006
Posts: 14

PostPosted: Fri Sep 15, 2006 1:58 pm
Reply with quote

Quote:
So you want the the data from the MIGRATE record ending with REAS=00000, followed by the DSN=name field from the DSN= record?


REAS=00000 and than 2 blanks and than should follow the DSN=name from the DSN=record

Quote:
Can the DSN record be identified just by looking for DSN= starting in position 6, or does it have to be identified in relation to the MIGRATE record?


The DSN= record must be identified in relation to the MIGRATE record.

Quote:
You don't want anything from the TIMES record?


This is correct. I don't need any information from the TIMES record.

Quote:
What is the RECFM and LRECL of the input file?


The RECFM=FBA and LRECL=166.

Quote:
What is the position of the last byte you need from the MIGRATE record (that is where does REAS=00000 end)?


REAS=00000 ended at position 96

I am very happy that you have answered to my question.
Thanks
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 15, 2006 9:23 pm
Reply with quote

Roland,

Based on what you've told me, I believe this DFSORT/ICETOOL job will give you what you want:

Code:

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file (FB/166)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//T2 DD DSN=&&T2,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//CON DD DSN=*.T1,VOL=REF=*.T1,DISP=(OLD,PASS)
//    DD DSN=*.T2,VOL=REF=*.T2,DISP=(OLD,PASS)
//T3 DD DSN=&&T3,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT DD RECFM=FB,DSN=...  output file (FB/146)
//TOOLIN DD *
COPY FROM(IN) USING(CTL1)
SPLICE FROM(CON) TO(T3) ON(147,8,ZD) -
 WITH(1,146) USING(CTL2)
SPLICE FROM(T3) TO(OUT) ON(155,8,ZD) -
 WITH(99,48) USING(CTL3)
/*
//CTL1CNTL DD *
  INREC OVERLAY=(147:SEQNUM,8,ZD)
  OUTFIL FNAMES=T1,
    INCLUDE=(16,7,CH,EQ,C'MIGRATE'),
    BUILD=(147:147,8,155:147,8,/,
           147:147,8,ZD,ADD,+2,TO=ZD,LENGTH=8,155:147,8)
  OUTFIL FNAMES=T2,BUILD=(1,162)
/*
//CTL2CNTL DD *
  OUTFIL FNAMES=T3,
    IFTHEN=(WHEN=(16,7,CH,NE,C'MIGRATE'),
      BUILD=(99:6,48,147:147,16))
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=OUT,BUILD=(1,146)
/*
Back to top
View user's profile Send private message
Roland_Achtsnit

New User


Joined: 30 Jul 2006
Posts: 14

PostPosted: Mon Sep 18, 2006 12:17 pm
Reply with quote

HI Frank,

The position of MIGRATE(16) was wrong, I changed it to 12.
It was my mistake. (I gave you the flase position sorry)

And now it works excellenc.
Thanks for your code.

Kind regards
Roland

icon_lol.gif
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: Mon Sep 18, 2006 8:42 pm
Reply with quote

Glad I could help.
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 How to split large record length file... DFSORT/ICETOOL 7
No new posts VB to FB - Finding LRECL SYNCSORT 4
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top