View previous topic :: View next topic
Author
Message
ALAIN G New User Joined: 16 Nov 2007Posts: 11 Location: france
Hi "Masters of DFSORT" ,
I would like GROUP in :
file 1 : ARC0734I - RC = 0 Reason - DSN
file 2 : ARC0734I - RC<> 0 Reason - DSN
file 3 : Others
ARC0734I ................RC= 0, REASON= 0, ...
DSN=DATAP.PROD.TDMRCV.SORTOUT.MERGE.G2745V00
ARC0734I ................RC= 70, REASON= 13, ...
DSN=DATAP.PROD.TDMRCV.SORTOUT.MERGE.G2745V00
ARC0723I
ARC0722I
ARC0728I
ARC0734I = 2 7
RC = 70 7
Reason = 79 12
DSN = 2 3
The ICESTGEX in SICESAMP is almost good, but RC not match with dsn
Thanks & Regards
Alain
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
You need to do a better job of explaining what you want to do. Your explanation is quite cryptic.
Please show an example of the records in your input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input file. If the file can have duplicates within it, show that in your example.
Also, run this job and show the //SYSOUT messages you receive, so I can see what level you're at:
Code:
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
RECORD
//SORTOUT DD DUMMY
//SYSIN DD *
OPTION COPY
/*
Back to top
ALAIN G New User Joined: 16 Nov 2007Posts: 11 Location: france
Input HSM LOG (FB 133)
Code:
ARC0522I SPACE MANAGEMENT STARTING ON VOLUME PR1312(SMSI) AT 03:03:36 ON 2010/10/06, SYSTEM A255
ARC0734I ACTION=EXPIRED FRVOL=PR1312 TOVOL= *** TRACKS= 15 RC= 0, REASON= 0, AGE= 7,
DSN=SPRO.AFS.DQT10272.TM040217.JOB68723.GEP$CTGP
ARC0522I SPACE MANAGEMENT STARTING ON VOLUME PR1396(SMSI) AT 03:03:36 ON 2010/10/06, SYSTEM A255
ARC0734I ACTION=SPCMGMT FRVOL=PR1312 TOVOL= *** TRACKS= 0 RC= 70, REASON= 1, AGE= 0,
DSN=SPRO.RLDS.D10261.T0255188.T075035
OUTPUT1 : All msg ARC0734 with RC <> 0 and NODUP for DSN (line +1)
ARC0734I = 2 7
RC = 70 7
Reason = 79 12
DSN = 3 48
Code:
ARC0734I RC= 70, REASON= 1 DSN=SPRO.RLDS.D10261.T0255188.T075035
or
Code:
DSN=SPRO.RLDS.D10261.T0255188.T075035 RC= 70, REASON= 1
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Well, we're getting closer.
Quote:
NODUP for DSN (line +1)
What does this mean? Please show an example with more records that illustrates when this is true and not true, and explain this rule in terms of the example.
Back to top
ALAIN G New User Joined: 16 Nov 2007Posts: 11 Location: france
I am going to try to simplify and to be clear
INPUT (FB 133)
Code:
.ARC0522I SPACE MANAGEMENT STARTING ON VOLUME PR1396(SMSI) AT 03:03:36 ON 2010/10/06, SYSTEM A255
.ARC0734I ACTION=SPCMGMT FRVOL=PR1312 TOVOL= *** TRACKS= 0 RC= 70, REASON= 1, AGE= 0,
. DSN=DSN1
.ARC0734I ACTION=SPCMGMT FRVOL=PR1312 TOVOL= *** TRACKS= 0 RC= 0, REASON= 1, AGE= 0,
. DSN=DSN2
.ARC0734I ACTION=SPCMGMT FRVOL=PR1312 TOVOL= *** TRACKS= 0 RC= 53, REASON= 2, AGE= 0,
DSN=DSN3
.ARC0734I ACTION=SPCMGMT FRVOL=PR1312 TOVOL= *** TRACKS= 0 RC= 53, REASON= 2, AGE= 0,
DSN=DSN3
.ARC0522I SPACE MANAGEMENT STARTING ON VOLUME PR1397(SMSI) AT 03:03:36 ON 2010/10/06, SYSTEM A255
IF ARC0734I (2 8) AND RC (70 7) <> 0
OUPUT (Record 2 6 8 is true)
Code:
DSN1 RC= 70, REASON= 1
DSN3 RC= 53, REASON= 2
DSN3 RC= 53, REASON= 2
Back to top
expat Global Moderator Joined: 14 Mar 2007Posts: 8797 Location: Welsh Wales
Alain,
Do you have SAS installed, as I have the SAS code that I have written years ago to perform an anlysis of the HSM miglogs.
Back to top
ALAIN G New User Joined: 16 Nov 2007Posts: 11 Location: france
Yes, I have SAS
Back to top
expat Global Moderator Joined: 14 Mar 2007Posts: 8797 Location: Welsh Wales
It's a while since I last used this, so maybe you might need to make some minor changes, but as I recall it worked good.
Code:
//SYSIN DD *
OPTIONS NOCENTER ERRORS=0;
DATA OUT01;
RETAIN
DSN ' '
AGE ' '
RCD ' '
RSN ' '
ACT ' '
FRV ' ';
INFILE HSMLOG;
INPUT @001 HSMLOG $120.;
INDX1A = INDEX(HSMLOG,'ACTION=EXPIRED');
INDX1B = INDEX(HSMLOG,'ACTION=SPCMGMT');
IF INDX1A GT 0 OR INDX1B GT 0 THEN DO;
IF INDX1A GT 0 THEN ACT = 'EXPIRE';
IF INDX1B GT 0 THEN ACT = 'SPMGMT';
FRV = SUBSTR(HSMLOG,31,6);
TRK = SUBSTR(HSMLOG,58,6);
RCD = SUBSTR(HSMLOG,68,4);
RSN = SUBSTR(HSMLOG,81,5);
AGE = SUBSTR(HSMLOG,92,4);
INDX2 = INDEX(HSMLOG,'DSN=');
IF INDX2 GT 0 THEN DO;
DSN = SUBSTR(HSMLOG,INDX2+4,121-INDX2+1);
OUTPUT;
END;
ELSE DO;
INPUT @001 HSMLOG $120.;
INDX3 = INDEX(HSMLOG,'DSN=');
DSN = SUBSTR(HSMLOG,INDX3+4,44);
OUTPUT;
END;
END;
/*
//
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Alain,
Here's a DFSORT job that will do what you asked for. I allowed a maximum of 44 for the dsname.
Code:
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (FB/133)
//SORTOUT DD DSN=... output file (FB/80)
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=GROUP,
BEGIN=(2,8,CH,EQ,C'ARC0734I',AND,70,7,CH,NE,C'RC= 0'),
RECORDS=2,PUSH=(52:70,21,79:SEQ=1))
OUTFIL INCLUDE=(79,1,ZD,EQ,2),
BUILD=(7,44,X,52,24,80:X)
/*
Back to top
ALAIN G New User Joined: 16 Nov 2007Posts: 11 Location: france
Perfect ......... (As usual )
Thank's
Back to top
Please enable JavaScript!