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
 

 

Help wanted on sort cards

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
dhivakarram

New User


Joined: 27 Jul 2006
Posts: 5
Location: chennai

PostPosted: Wed Apr 16, 2008 3:44 pm    Post subject: Help wanted on sort cards
Reply with quote

I have one input file, need to split it into two output files which can be done. problem i am facing in this is...for the first file say city code = 0, in need to do outrec to change the length and in the second file i need to write the records other than city code 0.
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: Wed Apr 16, 2008 3:51 pm    Post subject:
Reply with quote

Title of your thread changed - please use a meaningful title

OK - Input LRECL is what, input RECFM is what, output file 1 RECFM & LRECL are what, same for output file 2.

Why do you need to change the length, or are you reformatting the output file 1 ?

Give examples of both input and expected outputs.
Back to top
View user's profile Send private message
dhivakarram

New User


Joined: 27 Jul 2006
Posts: 5
Location: chennai

PostPosted: Wed Apr 16, 2008 4:02 pm    Post subject:
Reply with quote

input file and ouput file record length is 504 VB.

i am able to create one sortout file by using this sort card.

SORT FIELDS=COPY
INCLUDE COND=(5,2,CH,EQ,X'0004')
OUTREC OVERLAY=(14:C'XXXX XXXX XXXX XXXX',60:C'99999999',
74:C'99999999')  

now need to include one more conditon for city code = 0. then only it should do outrec and write this format to the sortout1 file. if city code is not equal to 0, should write the whole record into sortout2
Back to top
View user's profile Send private message
shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 171
Location: Bangalore

PostPosted: Wed Apr 16, 2008 5:20 pm    Post subject:
Reply with quote

Why don't you use two OUTFIL statements, e.g.

Code:
 
  OUTFIL FNAMES=SORTOUT1,INCLUDE=(5,2,CH,EQ,X'0004')
  OUTFIL FNAMES=SORTOUT2,INCLUDE=(5,2,CH,NE,X'0004')
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: Wed Apr 16, 2008 10:28 pm    Post subject:
Reply with quote

dhivakarram,

I think you want DFSORT control statements something like this. I assumed your city code was 1 byte in position 11 - change as needed

Code:

    SORT FIELDS=COPY
    INCLUDE COND=(5,2,CH,EQ,X'0004')
    OUTFIL FNAMES=SORTOUT1,INCLUDE=(11,1,CH,EQ,C'0'),
      OVERLAY=(14:C'XXXX XXXX XXXX XXXX',60:C'99999999',
           74:C'99999999')   
    OUTFIL FNAMES=SORTOUT2,SAVE


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Wanted to calculate TRK when i have B... Balu5491 JCL & VSAM 7 Wed Jul 19, 2017 5:43 pm
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm


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