Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Syncsort - can we move particular records to an output file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Syncsort - can we move particular records to an output file
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: 1703
Location: Australia

PostPosted: Thu Nov 06, 2008 3:15 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Nov 06, 2008 3:31 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Thu Nov 06, 2008 3:59 pm    Post subject: Reply to: can we move particular records into an output file
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 Moderator


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

PostPosted: Thu Nov 06, 2008 10:34 pm    Post subject:
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:

www.ibm.com/systems/support/storage/software/sort/mvs/ugpf/
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    Post subject: Reply to: can we move particular records into an output file
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: 1703
Location: Australia

PostPosted: Fri Nov 07, 2008 9:05 am    Post subject:
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

Site Director


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

PostPosted: Fri Nov 07, 2008 9:06 am    Post subject:
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: 1703
Location: Australia

PostPosted: Fri Nov 07, 2008 9:18 am    Post subject:
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

Site Director


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

PostPosted: Fri Nov 07, 2008 9:28 am    Post subject:
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: 1703
Location: Australia

PostPosted: Fri Nov 07, 2008 10:40 am    Post subject:
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

Site Director


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

PostPosted: Fri Nov 07, 2008 10:47 am    Post subject: Reply to: Syncsort - can we move particular records to an ou
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 Moderator


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

PostPosted: Fri Nov 07, 2008 9:35 pm    Post subject:
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: 1703
Location: Australia

PostPosted: Sat Nov 08, 2008 4:15 am    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Sat Nov 08, 2008 11:16 am    Post subject: Reply to: Syncsort - can we move particular records to an ou
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: 1288
Location: Chennai, India

PostPosted: Sat Nov 08, 2008 11:17 am    Post subject: Reply to: Syncsort - can we move particular records to an ou
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

Site Director


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

PostPosted: Sat Nov 08, 2008 11:23 am    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Sat Nov 08, 2008 11:26 am    Post subject: Reply to: Syncsort - can we move particular records to an ou
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us