IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Syncsort - can we move particular records to an output file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sakrish

New User


Joined: 05 Nov 2008
Posts: 21
Location: chennai

PostPosted: Thu Nov 06, 2008 1:00 pm
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Nov 06, 2008 3:15 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Thu Nov 06, 2008 3:31 pm
Reply with quote

Thanks Gerry, that's another one for me to squirrel away icon_wink.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Thu Nov 06, 2008 3:59 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Nov 06, 2008 10:34 pm
Reply with quote

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
View user's profile Send private message
sakrish

New User


Joined: 05 Nov 2008
Posts: 21
Location: chennai

PostPosted: Fri Nov 07, 2008 8:56 am
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Nov 07, 2008 9:05 am
Reply with quote

Hi,

from the messages you have shown, it looks like you are NOT using DFSORT/ICETOOL


Gerry
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Fri Nov 07, 2008 9:06 am
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Nov 07, 2008 9:18 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Fri Nov 07, 2008 9:28 am
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Nov 07, 2008 10:40 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Fri Nov 07, 2008 10:47 am
Reply with quote

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. . . icon_wink.gif

d
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Nov 07, 2008 9:35 pm
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Sat Nov 08, 2008 4:15 am
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Sat Nov 08, 2008 11:16 am
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Sat Nov 08, 2008 11:17 am
Reply with quote

Techies,

Quote:
SYT002I


What does this refer to? SYNCSORT error messages usually start with WER. Please throw light on this.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Sat Nov 08, 2008 11:23 am
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Sat Nov 08, 2008 11:26 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Unable to interpret a hex value to De... COBOL Programming 4
No new posts Syncsort help SYNCSORT 3
No new posts REXX/CMS How to place command console... CLIST & REXX 4
No new posts combine multiple unique records into ... DFSORT/ICETOOL 2
No new posts SYNCSORT-DB2 interface SYNCSORT 0
Search our Forums:

Back to Top