Discussion:
DFSORT question - How to combine several records to one record
(too old to reply)
Minoru Massaki
2012-02-27 18:48:32 UTC
Permalink
Hello DFSORT experts,

I'd like ask a help.
I have to do following by DFSORT

There is a data set which contains records with dsname, time, and
status as following
(dsname, time, status fields are fixed length)
The records are sorted by dsname and time.

dsn-aaa 08:00 open
dsn-aaa 08:10 close
dsn-aaa 08:15 delete
dsn-bbb 07:55 delete
dsn-ccc 08:05 open
dsn-ccc 08:07 close

I want to get a record by each dsname from multiple records as following.
(each dsname has max 8 records(status))

dsn-aaa 08:00 open 08:10 close 08:15 delete
dsn-bbb 07:55 delete
dsn-ccc 08:05 open 08:07 close

How can I make this output list by using DFSORT?

I'm trying to do this by using DFSORT SPLICE function, but I could not
get right answer.

Your help would be highly appreciated.


Minoru Massaki (M*M)
--
$***@h!!<B(B - Minoru Massaki (M*M)
E-mail: ***@gmail.com

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN
Scott Ford
2012-02-27 19:26:55 UTC
Permalink
Guys,
Correct me if I am ring, what about ICETOOL

Sent from my iPad
Scott Ford
Senior Systems Engineer
www.identityforge.com
Post by Minoru Massaki
Hello DFSORT experts,
I'd like ask a help.
I have to do following by DFSORT
There is a data set which contains records with dsname, time, and
status as following
(dsname, time, status fields are fixed length)
The records are sorted by dsname and time.
dsn-aaa 08:00 open
dsn-aaa 08:10 close
dsn-aaa 08:15 delete
dsn-bbb 07:55 delete
dsn-ccc 08:05 open
dsn-ccc 08:07 close
I want to get a record by each dsname from multiple records as following.
(each dsname has max 8 records(status))
dsn-aaa 08:00 open 08:10 close 08:15 delete
dsn-bbb 07:55 delete
dsn-ccc 08:05 open 08:07 close
How can I make this output list by using DFSORT?
I'm trying to do this by using DFSORT SPLICE function, but I could not
get right answer.
Your help would be highly appreciated.
Minoru Massaki (M*M)
--
全先 実 - Minoru Massaki (M*M)
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN
Scott Ford
2012-02-27 19:37:19 UTC
Permalink
Correct me if I am wrong but ICETOOL should work

Sent from my iPad
Scott Ford
Senior Systems Engineer
www.identityforge.com
Post by Scott Ford
Guys,
Correct me if I am ring, what about ICETOOL
Sent from my iPad
Scott Ford
Senior Systems Engineer
www.identityforge.com
Post by Minoru Massaki
Hello DFSORT experts,
I'd like ask a help.
I have to do following by DFSORT
There is a data set which contains records with dsname, time, and
status as following
(dsname, time, status fields are fixed length)
The records are sorted by dsname and time.
dsn-aaa 08:00 open
dsn-aaa 08:10 close
dsn-aaa 08:15 delete
dsn-bbb 07:55 delete
dsn-ccc 08:05 open
dsn-ccc 08:07 close
I want to get a record by each dsname from multiple records as following.
(each dsname has max 8 records(status))
dsn-aaa 08:00 open 08:10 close 08:15 delete
dsn-bbb 07:55 delete
dsn-ccc 08:05 open 08:07 close
How can I make this output list by using DFSORT?
I'm trying to do this by using DFSORT SPLICE function, but I could not
get right answer.
Your help would be highly appreciated.
Minoru Massaki (M*M)
--
全先 実 - Minoru Massaki (M*M)
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN
Frank Yaeger
2012-02-27 20:31:29 UTC
Permalink
Post by Minoru Massaki
I have to do following by DFSORT
There is a data set which contains records with dsname, time, and
status as following
(dsname, time, status fields are fixed length)
The records are sorted by dsname and time.
dsn-aaa 08:00 open
dsn-aaa 08:10 close
dsn-aaa 08:15 delete
dsn-bbb 07:55 delete
dsn-ccc 08:05 open
dsn-ccc 08:07 close
I want to get a record by each dsname from multiple records as following.
(each dsname has max 8 records(status))
dsn-aaa 08:00 open 08:10 close 08:15 delete
dsn-bbb 07:55 delete
dsn-ccc 08:05 open 08:07 close
You can use a DFSORT/ICETOOL job like the following. I assumed your
records
were already in order by the dsname as implied by your example. If not,
remove the
OPTION COPY statement:

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
dsn-aaa 08:00 open
dsn-aaa 08:10 close
dsn-aaa 08:15 delete
dsn-bbb 07:55 delete
dsn-ccc 08:05 open
dsn-ccc 08:07 close
dsn-ddd 08:01 open
dsn-ddd 08:02 close
dsn-ddd 08:03 open
dsn-ddd 08:04 close
dsn-ddd 08:05 open
dsn-ddd 08:06 close
dsn-ddd 08:07 open
dsn-ddd 08:08 close
//OUT DD SYSOUT=*
//TOOLIN DD *
SPLICE FROM(IN) TO(OUT) ON(1,11,CH) KEEPNODUPS WITHEACH -
WITH(26,14) WITH(40,14) WITH(54,14) WITH(68,14) -
WITH(82,14) WITH(96,14) WITH(110,14) USING(CTL1)
//CTL1CNTL DD *
OPTION COPY
INREC IFTHEN=(WHEN=GROUP,KEYBEGIN=(1,11),PUSH=(125:SEQ=1)),
IFTHEN=(WHEN=(125,1,ZD,EQ,2),BUILD=(1,11,26:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,3),BUILD=(1,11,40:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,4),BUILD=(1,11,54:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,5),BUILD=(1,11,68:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,6),BUILD=(1,11,82:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,7),BUILD=(1,11,96:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,8),BUILD=(1,11,110:12,14))
OUTFIL BUILD=(1,123)
/*

Frank Yaeger - DFSORT Development Team (IBM) - ***@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration

=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN
Minoru Massaki
2012-02-28 02:22:40 UTC
Permalink
Yaeger-san,

thank very much for telling me the way what I sould code DFSORT control cards.

But unfortunately KEYBEGIN parameter became 'OPERAND DEFINER ERROR' on
my z/OS V1.12 (ADCD system) .
Then I have checked DFSORT Application Programming Guide for z/OS
V1.12, I could not find out KEYBEGIN parameter.

Is KEYBEGIN a new keyword provided by new PTF?

Is there another way to do same things without KEYBEGIN parameter?
Because we don't have a chance to apply the PTF, if the KEYEGIN is
provided by PTF.

I appreciate your support.

Minoru Massaki (M*M)
Post by Frank Yaeger
Post by Minoru Massaki
I have to do following by DFSORT
There is a data set which contains records with dsname, time, and
status as following
(dsname, time, status fields are fixed length)
The records are sorted by dsname and time.
dsn-aaa 08:00 open
dsn-aaa 08:10 close
dsn-aaa 08:15 delete
dsn-bbb 07:55 delete
dsn-ccc 08:05 open
dsn-ccc 08:07 close
I want to get a record by each dsname from multiple records as following.
(each dsname has max 8 records(status))
dsn-aaa 08:00 open 08:10 close 08:15 delete
dsn-bbb 07:55 delete
dsn-ccc 08:05 open 08:07 close
You can use a DFSORT/ICETOOL job like the following. I assumed your
records
were already in order by the dsname as implied by your example. If not,
remove the
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
dsn-aaa 08:00 open
dsn-aaa 08:10 close
dsn-aaa 08:15 delete
dsn-bbb 07:55 delete
dsn-ccc 08:05 open
dsn-ccc 08:07 close
dsn-ddd 08:01 open
dsn-ddd 08:02 close
dsn-ddd 08:03 open
dsn-ddd 08:04 close
dsn-ddd 08:05 open
dsn-ddd 08:06 close
dsn-ddd 08:07 open
dsn-ddd 08:08 close
//OUT DD SYSOUT=*
//TOOLIN DD *
SPLICE FROM(IN) TO(OUT) ON(1,11,CH) KEEPNODUPS WITHEACH -
WITH(26,14) WITH(40,14) WITH(54,14) WITH(68,14) -
WITH(82,14) WITH(96,14) WITH(110,14) USING(CTL1)
//CTL1CNTL DD *
OPTION COPY
INREC IFTHEN=(WHEN=GROUP,KEYBEGIN=(1,11),PUSH=(125:SEQ=1)),
IFTHEN=(WHEN=(125,1,ZD,EQ,2),BUILD=(1,11,26:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,3),BUILD=(1,11,40:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,4),BUILD=(1,11,54:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,5),BUILD=(1,11,68:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,6),BUILD=(1,11,82:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,7),BUILD=(1,11,96:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,8),BUILD=(1,11,110:12,14))
OUTFIL BUILD=(1,123)
/*
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
--
$***@h!!<B(B - Minoru Massaki (M*M)
E-mail: ***@gmail.com

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN
Lizette Koehler
2012-02-28 02:59:21 UTC
Permalink
Post by Minoru Massaki
Yaeger-san,
thank very much for telling me the way what I sould code DFSORT control cards.
But unfortunately KEYBEGIN parameter became 'OPERAND DEFINER ERROR' on my
z/OS V1.12 (ADCD system) .
Then I have checked DFSORT Application Programming Guide for z/OS V1.12, I
could
Post by Minoru Massaki
not find out KEYBEGIN parameter.
Is KEYBEGIN a new keyword provided by new PTF?
Is there another way to do same things without KEYBEGIN parameter?
Because we don't have a chance to apply the PTF, if the KEYEGIN is
provided by PTF.
Post by Minoru Massaki
I appreciate your support.
Minoru Massaki (M*M)
Minoru-San

A search with DFSORT and KEYBEING shows

PTF UK90025 for z/OS DFSORT V1R10 and PTF UK90026 for z/OS DFSORT V1R12
(Oct, 2010) provide important enhancements to DFSORT and DFSORT's ICETOOL
for resizing records (RESIZE operator); updating the trailer record
(IFTRAIL); processing subsets (ACCEPT); translation of ASCII to EBCDIC
(TRAN=ATOE), EBCDIC to ASCII (TRAN=ETOA), EBCDIC hex to binary (TRAN=UNHEX),
and more; date field arithmetic (ADDDAYS, ADDMONS, ADDYEARS, SUBDAYS,
SUBMONS, SUBYEARS, DATEDIFF, NEXTDday, PREVDday, LASTDAYW, LASTDAYM,
LASTDAYQ and LASTDAYY); timestamp constant with microseconds (DATE5); group
functions (KEYBEGIN); use of SET and PROC symbols in control statements
(JPn"string" in EXEC PARM); more information in reports; larger fields;
easier migration from other sort products, and more.

Hope this helps

Lizette

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN
Minoru Massaki
2012-02-28 03:16:14 UTC
Permalink
Koehler-san,

Thank you very much for giving me valuable information.

I'll check the PTF on a customer's z/OS V1.10 systems as well as our
z/OS V1.12 system.
I hope that the customer already has installed the PTF.

Again, Thank you a lot.

Minoru Massaki (M*M)
Post by Minoru Massaki
Post by Minoru Massaki
Yaeger-san,
thank very much for telling me the way what I sould code DFSORT control
cards.
Post by Minoru Massaki
But unfortunately KEYBEGIN parameter became 'OPERAND DEFINER ERROR' on my
z/OS V1.12 (ADCD system) .
Then I have checked DFSORT Application Programming Guide for z/OS V1.12, I
could
Post by Minoru Massaki
not find out KEYBEGIN parameter.
Is KEYBEGIN a new keyword provided by new PTF?
Is there another way to do same things without KEYBEGIN parameter?
Because we don't have a chance to apply the PTF, if the KEYEGIN is
provided by PTF.
Post by Minoru Massaki
I appreciate your support.
Minoru Massaki (M*M)
Minoru-San
A search with DFSORT and KEYBEING shows
PTF UK90025 for z/OS DFSORT V1R10 and PTF UK90026 for z/OS DFSORT V1R12
(Oct, 2010) provide important enhancements to DFSORT and DFSORT's ICETOOL
for resizing records (RESIZE operator); updating the trailer record
(IFTRAIL); processing subsets (ACCEPT); translation of ASCII to EBCDIC
(TRAN=ATOE), EBCDIC to ASCII (TRAN=ETOA), EBCDIC hex to binary (TRAN=UNHEX),
and more; date field arithmetic (ADDDAYS, ADDMONS, ADDYEARS, SUBDAYS,
SUBMONS, SUBYEARS, DATEDIFF, NEXTDday, PREVDday, LASTDAYW, LASTDAYM,
LASTDAYQ and LASTDAYY); timestamp constant with microseconds (DATE5); group
functions (KEYBEGIN); use of SET and PROC symbols in control statements
(JPn"string" in EXEC PARM); more information in reports; larger fields;
easier migration from other sort products, and more.
Hope this helps
Lizette
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
--
$***@h!!<B(B - Minoru Massaki (M*M)
E-mail: ***@gmail.com

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN
Minoru Massaki
2012-02-28 03:25:07 UTC
Permalink
I added an additional DFSORT step which add sequence number in dsname
records before ICETOOL step.
So the ICETOOL without KEYBEGIN parameter got the right result.


//ADDSEQ EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
DSN-AAA 08:00 OPEN
DSN-AAA 08:10 CLOSE
DSN-AAA 08:15 DELETE
DSN-BBB 07:55 DELETE
DSN-CCC 08:05 OPEN
DSN-CCC 08:07 CLOSE
DSN-DDD 08:01 OPEN
DSN-DDD 08:02 CLOSE
DSN-DDD 08:03 OPEN
DSN-DDD 08:04 CLOSE
DSN-DDD 08:05 OPEN
DSN-DDD 08:06 CLOSE
DSN-DDD 08:07 OPEN
DSN-DDD 08:08 CLOSE
/*
//SORTOUT DD SYSOUT=*
//ADDSEQ DD DSN=&&ADDSEQ,DISP=(NEW,PASS),UNIT=SYSDA,
// SPACE=(CYL,(2,1),RLSE),
// DCB=(RECFM=FB,LRECL=125,BLKSIZE=0)
//SYSIN DD *
INREC OVERLAY=(125:SEQNUM,1,ZD,START=1,RESTART=(1,11))
SORT FIELDS=(1,10,CH,A,12,5,CH,A)
OUTFIL FNAMES=ADDSEQ,REMOVECC,
BUILD=(1,125)
/*
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=&&ADDSEQ,DISP=(OLD,DELETE),UNIT=SYSDA
//OUT DD SYSOUT=*
//TOOLIN DD *
SPLICE FROM(IN) TO(OUT) ON(1,11,CH) KEEPNODUPS WITHEACH -
WITH(26,14) WITH(40,14) WITH(54,14) WITH(68,14) -
WITH(82,14) WITH(96,14) WITH(110,14) USING(CTL1)
/*
//CTL1CNTL DD *
OPTION COPY
INREC IFTHEN=(WHEN=(125,1,ZD,EQ,2),BUILD=(1,11,26:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,3),BUILD=(1,11,40:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,4),BUILD=(1,11,54:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,5),BUILD=(1,11,68:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,6),BUILD=(1,11,82:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,7),BUILD=(1,11,96:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,8),BUILD=(1,11,110:12,14))
OUTFIL BUILD=(1,123)
/*

Again, I appreciate your kind support.


Minoru Massaki (M*M)
Post by Minoru Massaki
Yaeger-san,
thank very much for telling me the way what I sould code DFSORT control cards.
But unfortunately KEYBEGIN parameter became 'OPERAND DEFINER ERROR' on
my z/OS V1.12 (ADCD system) .
Then I have checked DFSORT Application Programming Guide for z/OS
V1.12, I could not find out KEYBEGIN parameter.
Is KEYBEGIN a new keyword provided by new PTF?
Is there another way to do same things without KEYBEGIN parameter?
Because we don't have a chance to apply the PTF, if the KEYEGIN is
provided by PTF.
I appreciate your support.
Minoru Massaki (M*M)
Post by Frank Yaeger
Post by Minoru Massaki
I have to do following by DFSORT
There is a data set which contains records with dsname, time, and
status as following
(dsname, time, status fields are fixed length)
The records are sorted by dsname and time.
dsn-aaa 08:00 open
dsn-aaa 08:10 close
dsn-aaa 08:15 delete
dsn-bbb 07:55 delete
dsn-ccc 08:05 open
dsn-ccc 08:07 close
I want to get a record by each dsname from multiple records as following.
(each dsname has max 8 records(status))
dsn-aaa 08:00 open 08:10 close 08:15 delete
dsn-bbb 07:55 delete
dsn-ccc 08:05 open 08:07 close
You can use a DFSORT/ICETOOL job like the following. I assumed your
records
were already in order by the dsname as implied by your example. If not,
remove the
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
dsn-aaa 08:00 open
dsn-aaa 08:10 close
dsn-aaa 08:15 delete
dsn-bbb 07:55 delete
dsn-ccc 08:05 open
dsn-ccc 08:07 close
dsn-ddd 08:01 open
dsn-ddd 08:02 close
dsn-ddd 08:03 open
dsn-ddd 08:04 close
dsn-ddd 08:05 open
dsn-ddd 08:06 close
dsn-ddd 08:07 open
dsn-ddd 08:08 close
//OUT DD SYSOUT=*
//TOOLIN DD *
SPLICE FROM(IN) TO(OUT) ON(1,11,CH) KEEPNODUPS WITHEACH -
WITH(26,14) WITH(40,14) WITH(54,14) WITH(68,14) -
WITH(82,14) WITH(96,14) WITH(110,14) USING(CTL1)
//CTL1CNTL DD *
OPTION COPY
INREC IFTHEN=(WHEN=GROUP,KEYBEGIN=(1,11),PUSH=(125:SEQ=1)),
IFTHEN=(WHEN=(125,1,ZD,EQ,2),BUILD=(1,11,26:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,3),BUILD=(1,11,40:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,4),BUILD=(1,11,54:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,5),BUILD=(1,11,68:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,6),BUILD=(1,11,82:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,7),BUILD=(1,11,96:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,8),BUILD=(1,11,110:12,14))
OUTFIL BUILD=(1,123)
/*
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
--
--
$***@h!!<B(B - Minoru Massaki (M*M)
E-mail: ***@gmail.com

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN
Frank Yaeger
2012-02-28 18:06:31 UTC
Permalink
Post by Minoru Massaki
I added an additional DFSORT step which add sequence number in dsname
records before ICETOOL step.
So the ICETOOL without KEYBEGIN parameter got the right result.
...
You don't need to add a STEP - you can just use an
IFTHEN clause with RESTART instead of the IFTHEN clause
with KEYBEGIN, as shown in my other note.

Frank Yaeger - DFSORT Development Team (IBM) - ***@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration

=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN
Minoru Massaki
2012-02-29 15:38:46 UTC
Permalink
Yaeger-san,

Thank you very much for telling me the way without additional DFSORT
step. It is very helpful for me.
I really appreciate your support.

By the way, our customer already had installed the PTF on their z/OS
V1.10. So they could use KEYBEGIN parameter.
I'll try to install the PTF on our z/OS V1.12.

Again thank you a lot!

Minoru Massaki (M*M)
Post by Frank Yaeger
Post by Minoru Massaki
I added an additional DFSORT step which add sequence number in dsname
records before ICETOOL step.
So the ICETOOL without KEYBEGIN parameter got the right result.
...
You don't need to add a STEP - you can just use an
IFTHEN clause with RESTART instead of the IFTHEN clause
with KEYBEGIN, as shown in my other note.
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
--
$***@h!!<B(B - Minoru Massaki (M*M)
E-mail: ***@gmail.com

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN
Frank Yaeger
2012-02-28 18:06:36 UTC
Permalink
Post by Minoru Massaki
But unfortunately KEYBEGIN parameter became 'OPERAND DEFINER ERROR' on
my z/OS V1.12 (ADCD system) .
Then I have checked DFSORT Application Programming Guide for z/OS
V1.12, I could not find out KEYBEGIN parameter.
Is KEYBEGIN a new keyword provided by new PTF?
Is there another way to do same things without KEYBEGIN parameter?
Because we don't have a chance to apply the PTF, if the KEYEGIN is
provided by PTF.
KEYBEGIN has been available with DFSORT since October, 2010 with
z/OS DFSORT V1R10 PTF UK90025 and z/OS DFSORT V1R12 PTF UK90026.
If you don't have that PTF installed, you can do what you want without
KEYBEGIN using a DFSORT job like this:

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
dsn-aaa 08:00 open
dsn-aaa 08:10 close
dsn-aaa 08:15 delete
dsn-bbb 07:55 delete
dsn-ccc 08:05 open
dsn-ccc 08:07 close
dsn-ddd 08:01 open
dsn-ddd 08:02 close
dsn-ddd 08:03 open
dsn-ddd 08:04 close
dsn-ddd 08:05 open
dsn-ddd 08:06 close
dsn-ddd 08:07 open
dsn-ddd 08:08 close
//OUT DD SYSOUT=*
//TOOLIN DD *
SPLICE FROM(IN) TO(OUT) ON(1,11,CH) KEEPNODUPS WITHEACH -
WITH(26,14) WITH(40,14) WITH(54,14) WITH(68,14) -
WITH(82,14) WITH(96,14) WITH(110,14) USING(CTL1)
//CTL1CNTL DD *
OPTION COPY
INREC IFTHEN=(WHEN=INIT,
OVERLAY=(125:SEQNUM,1,ZD,START=1,RESTART=(1,11))),
IFTHEN=(WHEN=(125,1,ZD,EQ,2),BUILD=(1,11,26:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,3),BUILD=(1,11,40:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,4),BUILD=(1,11,54:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,5),BUILD=(1,11,68:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,6),BUILD=(1,11,82:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,7),BUILD=(1,11,96:12,14)),
IFTHEN=(WHEN=(125,1,ZD,EQ,8),BUILD=(1,11,110:12,14))
OUTFIL BUILD=(1,123)
/*

Frank Yaeger - DFSORT Development Team (IBM) - ***@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration

=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@bama.ua.edu with the message: INFO IBM-MAIN
r***@gmail.com
2014-03-10 12:06:14 UTC
Permalink
Post by Minoru Massaki
Hello DFSORT experts,
I'd like ask a help.
I have to do following by DFSORT
There is a data set which contains records with dsname, time, and
status as following
(dsname, time, status fields are fixed length)
The records are sorted by dsname and time.
dsn-aaa 08:00 open
dsn-aaa 08:10 close
dsn-aaa 08:15 delete
dsn-bbb 07:55 delete
dsn-ccc 08:05 open
dsn-ccc 08:07 close
I want to get a record by each dsname from multiple records as following.
(each dsname has max 8 records(status))
dsn-aaa 08:00 open 08:10 close 08:15 delete
dsn-bbb 07:55 delete
dsn-ccc 08:05 open 08:07 close
How can I make this output list by using DFSORT?
I'm trying to do this by using DFSORT SPLICE function, but I could not
get right answer.
Your help would be highly appreciated.
Minoru Massaki (M*M)
--
全先 実 - Minoru Massaki (M*M)
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
Hi.. Could you please share the sort card for this. I came up with similar sort of requirement. So just trying around to get any sort of help.
Loading...