View previous topic :: View next topic
|
Author |
Message |
sakrish
New User
Joined: 05 Nov 2008 Posts: 21 Location: chennai
|
|
|
|
Can someone tell can we move only paritcular records in a file to output
I have 50 records out of which I want to move from 3rd record to 10 th record and 25th record to 40th record into an output file. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
try this
Code: |
SORT FIELDS=COPY
INREC OVERLAY=(81:SEQNUM,8,ZD)
OUTFIL INCLUDE=((81,8,ZD,GE,03,AND,81,8,ZD,LE,10),OR,
(81,8,ZD,GE,25,AND,81,8,ZD,LE,40)),
BUILD=(1,80)
|
This is based on LRECL=80 and RECFM=FB
Gerry |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Thanks Gerry, that's another one for me to squirrel away |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
but if You have the proper DFSORT ptf' s, You could use the new subset operator
SUBSET .... RRN(3,10) RRN(25,40)
search the DFSORT forum for SUBSET |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
sakrish,
You can do that quite easily using the new SUBSET operator of DFSORT's ICETOOL available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008). For example:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file
//OUT DD DISP=... output file
//TOOLIN DD *
SUBSET FROM(IN) TO(OUT) INPUT KEEP RRN(3,10) RRN(25,40)
/*
|
For complete details on the new SUBSET function and the other new functions available with PTF UK90013, see:
Use [URL] BBCode for External Links
|
|
Back to top |
|
|
sakrish
New User
Joined: 05 Nov 2008 Posts: 21 Location: chennai
|
|
|
|
Thanks a lot guys..
I am new to ICETOOLS
when I ran the JCL,
Code: |
SYT002I "TOOLIN" INTERFACE BEING USED
SUBSET FROM(IN) TO(OUT) INPUT KEEP RRN(3,10) RRN(25,40)
SYT048E STATEMENT DOES NOT BEGIN WITH A VALID OPERATOR
SYT030I OPERATION COMPLETED WITH RETURN CODE 12 |
can some one please help
-Sai |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
from the messages you have shown, it looks like you are NOT using DFSORT/ICETOOL
Gerry |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
You are running Syncsort rather than DFSORT.
Suggest you try with earlier code Gerry posted as the new DFSORT SUBSET operator is only available with DFSORT. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Dick,
even having DFSORT doesn't help.
My version of DFSORT is ancient and not likely to change.
Below is my version of DFSORT.
ICE201I 0 RECORD TYPE ...
the 0 indicates you do not have the July, 2008 or April, 2006 DFSORT functions. You are way behind on DFSORT functional PTFs. Ask your System Programmer to install z/OS DFSORT PTF UK90013.
You may or may not have the Dec, 2004 DFSORT functions (IFTHEN, OVERLAY, SFF, UFF, etc), which corresponds to z/OS DFSORT V1R5 PTF UQ95214. try using one of these functions - if you get errors trying to use it, then you don't even have the Dec, 2004 PTF installed.
Gerry |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hi Gerry,
No, but Sai is using Syncsort and if that product is even a little bit current on their system, the ifthen should work. . .
IFTHEN & OVERLAY became available in Syncsort 1.2.x iirc. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Dick,
I was just having a private whinge about the version of DFSORT in my shop and it's very difficult to get it upgraded.
Gerry |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hi Gerry,
Quote: |
I was just having a private whinge about the version of DFSORT in my shop and it's very difficult to get it upgraded. |
It is simply amazing (to me anyway) how many organizations allow their software to fall far behind. A business case can often be made not to be among the very first to upgrade, but when software gets several years out of date, the risk of the "old stuff" is greater than the risk of doing the upgrade - not counting missing performance enhancements and the new functionality.
Rant off. . .
Whine on. . .
d |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Gerry,
I assume you realize that the upgrade "problem" is a problem with your shop, not with DFSORT. In fact, we ship the new functions as PTFs to make them easier to install. I don't know why your shop chooses not to install PTFs, but that's not generally the way shops operate. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Frank,
I totally agree with you, it has nothing to do with DFSORT, as you can see from the earlier message my version of DFSORT is lagging behind.
I better not say anymore.
Gerry |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Frank,
Quote: |
I don't know why your shop chooses not to install PTFs, but that's not generally the way shops operate. |
The same in my shop. I got to know about the latest release (JUly 2008) of DFSORT from this forum and wanted that PTF to be installed in my shop.
But nothing was done and still my old shop uses the old version. We r spending more time on sort JCL's when it is actually not needed :( . |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Techies,
What does this refer to? SYNCSORT error messages usually start with WER. Please throw light on this. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hi AAru,
Quote: |
SYT002I "TOOLIN" INTERFACE BEING USED
SUBSET FROM(IN) TO(OUT) INPUT KEEP RRN(3,10) RRN(25,40)
SYT048E STATEMENT DOES NOT BEGIN WITH A VALID OPERATOR
SYT030I OPERATION COMPLETED WITH RETURN CODE 12 |
Quote: |
What does this refer to? |
SYT messages are Synctool messages - just as WER messages are syscsort messages. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Dick,
Quote: |
SYT messages are Synctool messages - just as WER messages are syscsort messages.
|
Oops forgot . This happens when one is back after a looong vacation :(
Anyways Thanks. |
|
Back to top |
|
|
|