MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Spliting the Sort Card

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
puttu
Beginner


Joined: 29 Jul 2010
Posts: 41
Topics: 9

PostPosted: Mon Aug 02, 2010 9:56 pm    Post subject: Spliting the Sort Card Reply with quote

I'm generating sort card in one file in 1st step. The length of file is 158.
I'm going to use this (158 length file) in next step. As we know sort cannot take that much length. I need to split that file.
How can i do...?
Back to top
View user's profile Send private message Send e-mail
puttu
Beginner


Joined: 29 Jul 2010
Posts: 41
Topics: 9

PostPosted: Mon Aug 02, 2010 10:04 pm    Post subject: Reply with quote

For Example:
Input file:
INCLUDE COND=(82,6,PD,EQ,0,AND,249,10,CH,GT,C'2010-02-08',AND,249,10,CH,LT,C'2010-02-02',1,16,CH,A,87,4,ZD,D)

above sort condition will be in single record in file.

Output file should be:
INCLUDE COND=(82,6,PD,EQ,0,AND,
249,10,CH,GT,C'2010-02-08',
AND,249,10,CH,LT,C'2010-02-02',
1,16,CH,A,87,4,ZD,D)

In this way i need.
Back to top
View user's profile Send private message Send e-mail
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Mon Aug 02, 2010 11:41 pm    Post subject: Reply with quote

read the manual looking for continuation of control cards.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
puttu
Beginner


Joined: 29 Jul 2010
Posts: 41
Topics: 9

PostPosted: Tue Aug 03, 2010 12:43 am    Post subject: Reply with quote

Hi Nic,
For continuation ... I know..
I need to split that records into below mentione output format....

If possible can u send the code...?
Back to top
View user's profile Send private message Send e-mail
Anuj Dhawan
Intermediate


Joined: 19 Jul 2007
Posts: 298
Topics: 7
Location: Mumbai,India

PostPosted: Tue Aug 03, 2010 1:53 am    Post subject: Re: Spliting the Sort Card Reply with quote

puttu wrote:
The length of file is 158.
I'm going to use this (158 length file) in next step. As we know sort cannot take that much length. I need to split that file. ?
Your explanation is pretty confusing. When you said, "length of file is 158..and sort cannot take that much length" -- I thought you are talking about max. LRECL SORT products can deal with!

However, as Nic has observed, probably your question is related to "continuation of control cards" in a SORT application.

Assuming you really want to know about the continuation rules and you are getting an error for that then to avoid such an error you need to comply with DFSORT's syntax rules. It's hard to tell which columns your SORT statement are in, but it appears that you ran over column 71 which is the last column you can use.

One way to continue the statement correctly is - stopping at a comma before column 72 and continuing on the next line.

The other way would be to go up to column 71, put a non-blank in 72 to show continuation and continue on the next line.

See the following for complete details on DFSORT's continuation rules: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/3.3.1?DT=20060615185603
_________________
Regards,
Anuj
Back to top
View user's profile Send private message
puttu
Beginner


Joined: 29 Jul 2010
Posts: 41
Topics: 9

PostPosted: Tue Aug 03, 2010 2:24 am    Post subject: Reply with quote

Kindly find the below example:

Input file:
INCLUDE COND=(82,6,PD,EQ,0,AND,249,10,CH,GT,C'2010-02-08',AND,249,10,CH,LT,C'2010-02-02',1,16,CH,A,87,4,ZD,D)



Output file should be:
INCLUDE COND=(82,6,PD,EQ,0,AND,
249,10,CH,GT,C'2010-02-08',
AND,249,10,CH,LT,C'2010-02-02',
1,16,CH,A,87,4,ZD,D)

I need output file as above.
Back to top
View user's profile Send private message Send e-mail
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue Aug 03, 2010 4:27 am    Post subject: Reply with quote

Why not build it properly in the first place?
the way you are going at it,
you will build your 'too large' sort statement,
and then always each time have to create custom sort control statements
to manipulate the output of your poorly designed and developed useless-sort-card generator
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
Anuj Dhawan
Intermediate


Joined: 19 Jul 2007
Posts: 298
Topics: 7
Location: Mumbai,India

PostPosted: Tue Aug 03, 2010 5:02 am    Post subject: Reply with quote

puttu wrote:
Kindly find the below example:

Input file:
INCLUDE COND=(82,6,PD,EQ,0,AND,249,10,CH,GT,C'2010-02-08',AND,249,10,CH,LT,C'2010-02-02',1,16,CH,A,87,4,ZD,D)



Output file should be:
INCLUDE COND=(82,6,PD,EQ,0,AND,
249,10,CH,GT,C'2010-02-08',
AND,249,10,CH,LT,C'2010-02-02',
1,16,CH,A,87,4,ZD,D)

I need output file as above.
I agree with Dick but for this specific example, try this:
Code:
//STEP0001 EXEC PGM=SORT                       
//SORTIN   DD DSN=..file with LRECL 158,DISP=SHR       
//*                                             
//SORTOUT  DD   SYSOUT=*                       
//SYSOUT   DD   SYSOUT=*                       
//SYSIN    DD    *                             
  OPTION COPY                                   
  OUTFIL BUILD=(1,31,/,32,27,/,59,31,/,90,20)   
/*                                             
but this is a very static solution - next time when differnent sort statements are generated from your "step1" above OUTFIL might not work well. Suggest you modify your first step itself. Or tell us how are you generating the SORT-card, hopefully you'll get a better alternative.
_________________
Regards,
Anuj
Back to top
View user's profile Send private message
puttu
Beginner


Joined: 29 Jul 2010
Posts: 41
Topics: 9

PostPosted: Tue Aug 03, 2010 6:55 am    Post subject: Reply with quote

I checked which you provided condition.
Its working fine...

Thanks..
Back to top
View user's profile Send private message Send e-mail
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Tue Aug 03, 2010 12:50 pm    Post subject: Reply with quote

Quote:
Its working fine...


Good grief. I don't see how. Regardless of how you break this statement up, it will NOT work because it has a logic error AND a syntax error!

1,16,CH,A,87,4,ZD,D

This seems to be a fragment from a SORT statement that you attached to the INCLUDE statement - it will result in a syntax error.

Code:

 INCLUDE COND=(82,6,PD,EQ,0,AND,
   249,10,CH,GT,C'2010-02-08',AND,
   249,10,CH,LT,C'2010-02-02')


This INCLUDE statement can never be true because there's no date that's GT 2010-02-08 and LT 2010-02-02.

I'm still not sure what you're trying to do here. Are you trying to break up any INCLUDE statement your program generates into valid continuation lines, or just this one specific INCORRECT INCLUDE statement, or what?
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group