View previous topic :: View next topic
|
Author |
Message |
Roland_Achtsnit
New User
Joined: 30 Jul 2006 Posts: 14
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
Roland_Achtsnit
New User
Joined: 30 Jul 2006 Posts: 14
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
Roland_Achtsnit
New User
Joined: 30 Jul 2006 Posts: 14
|
|
|
|
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
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Glad I could help. |
|
Back to top |
|
|
|
|