|
|
| Author |
Message |
spriya
New User
Joined: 06 Oct 2005 Posts: 40
|
|
|
|
Hi,
I am having the requirement to extract the data from the report .so i am using sort to extract the records that the field EVENT HAVING '1'
I can able to extract the first line of the record only i need the USER NAME(USER ID) field also it is in the second line ,please let me know how to extract the USER NAME Field using sort
*JOB/USER *STEP/
DATE TIME SYSID NAME GROUP EVENT
08.022 09:54:23 SP07 USERIDV XXUSERSX 1
USER ID AAAA
08.033 09:22:20 SP06 USERIDJ XXXUSERV 1
USER ID BBBB[img][/img] |
|
| Back to top |
|
 |
References
|
|
 |
dbzTHEdinosauer
Senior Member
Joined: 20 Oct 2006 Posts: 1618 Location: germany
|
|
|
|
| what did you use to extract the 'event having' ? |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Moderator
Joined: 15 Feb 2005 Posts: 4577 Location: San Jose, CA
|
|
|
|
priya,
It's not clear what you want to do. You show two records that end with '1' each followed by a USER ID record. If that's what the report really looks like, then you could just use INCLUDE to include each record with '1' and each record with 'USER ID'. If it's more complicated than that, for example some records don't have a '1' so you don't want those records or the USER ID records that follow them, then you need to show a better example of your input records with all variations and your expected output. Explain the "rules" for getting from input to output. Also, give the RECFM and LRECL of the input file and the starting position, length and format of each relevant field. |
|
| Back to top |
|
 |
Skolusu
DFSORT Developer
Joined: 07 Dec 2007 Posts: 356 Location: San Jose
|
|
|
|
Spriya,
if your intention is to get the next record which follows the '1' then here is DFSORT/ICETOOL JCL which will give you the desired results
| Code: |
//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=your input file,Disp=shr
//OUT DD SYSOUT=*
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(134,8,CH) ALLDUPS USING(CTL1)
//CTL1CNTL DD *
INREC IFTHEN=(WHEN=INIT,
OVERLAY=(134:SEQNUM,8,ZD)),
IFTHEN=(WHEN=(26,1,CH,EQ,C'1'),
OVERLAY=(134:+1,ADD,134,8,ZD,M11,LENGTH=8))
OUTFIL FNAMES=OUT,BUILD=(01,133)
/*
|
|
|
| Back to top |
|
 |
|
|
|