Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Syncsort - can we move particular records to an output file
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
sakrish

New User


Joined: 05 Nov 2008
Posts: 18
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
References
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 691

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: 3731
Location: Brussels once more ...

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: 3272
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: 4675
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: 18
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: 691

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

Global Moderator


Joined: 23 Nov 2006
Posts: 9186
Location: 221 B Baker St

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
Moved: Fri Nov 07, 2008 9:07 am by dick scherrer From DFSORT/ICETOOL to JCL
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 691

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

Global Moderator


Joined: 23 Nov 2006
Posts: 9186
Location: 221 B Baker St

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: 691

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

Global Moderator


Joined: 23 Nov 2006
Posts: 9186
Location: 221 B Baker St

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: 4675
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: 691

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: 1253
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 HoursGoto page 1, 2  Next
Page 1 of 2