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 

Creating dynamic control card
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
kavi
Beginner


Joined: 15 Sep 2006
Posts: 64
Topics: 22

PostPosted: Tue Jan 09, 2007 7:26 am    Post subject: Creating dynamic control card Reply with quote

Hi All,
I have a input file of 9 bytes. I want to creat a dynamic control card
with the following condition.
OMIT COND=(17,9,CH,EQ,C'input file value')
the input file has more than 2 record, hence for first record the condition should be
OMIT COND=(17,9,CH,EQ,C'input file value',OR,
This can be achieved by STOPAFT=1.
For second should be
17,9,CH,EQ,C'input file value',OR,
and so on.
Last record should be
17,9,CH,EQ,C'input file value')
How this can be achieved by SORT. In my shop we have
only SORT (No icetool)

Thanks in advance
Kavi
Back to top
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Tue Jan 09, 2007 8:16 am    Post subject: Reply with quote

How about REXX?

O.
________
Mazda RX-3 history


Last edited by ofer71 on Sat Feb 05, 2011 11:55 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
kavi
Beginner


Joined: 15 Sep 2006
Posts: 64
Topics: 22

PostPosted: Tue Jan 09, 2007 8:35 am    Post subject: Reply with quote

Thanks for your reply Ofer71,
But SORT is preferable

Thanks in Advance
Kavi
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Tue Jan 09, 2007 12:17 pm    Post subject: Reply with quote

kavi,

The best way to generate the dynamic control cards is to put some dummy values in the include condition. By doing so your next sort step which reads in the dynamic control cards will work fine.

try this


Code:

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
123456701
123456702
123456703
123456704
123456705
123456706
123456707
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  SORT FIELDS=COPY
  OUTREC FIELDS=(13X,
                 C'17,09,CH,EQ,C''',
                 1,9,
                 C'''',
                 C',OR,',80:X)

  OUTFIL REMOVECC,
  HEADER1=(2X,C'OMIT COND=(17,09,CH,EQ,C'''
              C'AAAAAAAAAA',
              C'''',
              C',OR,',80:X),

  TRAILER1=(13X,C'17,09,CH,EQ,C''',
              C'ZZZZZZZZZZ',
              C'''',
              C')',80:X)
/*


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kavi
Beginner


Joined: 15 Sep 2006
Posts: 64
Topics: 22

PostPosted: Tue Jan 09, 2007 11:43 pm    Post subject: Reply with quote

Kolusu,
You are simply superb.

Thanks for your solution It works.

Thanks for all
Kavi
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Wed Jan 10, 2007 1:28 am    Post subject: Reply with quote

I don't know how to use sort control cards but it looks like this will generate OMIT conditions for AAAAAAAAAA and ZZZZZZZZZZ which does not meet the original criteria? Is this right?

I'd like to understand why Rexx is not the appropriate tool for this. It is 6 or 7 lines of very easy to understand, read "maintain", code.
Back to top
View user's profile Send private message Visit poster's website
kavi
Beginner


Joined: 15 Sep 2006
Posts: 64
Topics: 22

PostPosted: Wed Jan 10, 2007 5:19 am    Post subject: Reply with quote

semigeezer
As per our requirement it should be in SORT. Thats why we tried it in SORT. It doesn't mean that Rexx is not the appropriate tool for this. Can you please post the REXX solution so that i can learn an alternate solution for this.


Thanks
Kavi
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Wed Jan 10, 2007 9:57 am    Post subject: Reply with quote

semigeezer wrote:
I don't know how to use sort control cards but it looks like this will generate OMIT conditions for AAAAAAAAAA and ZZZZZZZZZZ which does not meet the original criteria? Is this right?

I'd like to understand why Rexx is not the appropriate tool for this. It is 6 or 7 lines of very easy to understand, read "maintain", code.


Semigeezer,

Yes we do create 2 extra omit conditions the sort card. But these are dummy values which never exist in the input file. We need to pick such dummy values. These dummy values would come in handy when the input file is empty.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


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

PostPosted: Wed Jan 10, 2007 12:17 pm    Post subject: Reply with quote

Actually, a better dummy condition for "never true" is:

1,1,NE,1,1,

That way, you don't need to pick a value that doesn't exist in the input file.
_________________
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
kavi
Beginner


Joined: 15 Sep 2006
Posts: 64
Topics: 22

PostPosted: Wed Jan 17, 2007 1:52 am    Post subject: Reply with quote

Hi All,
Is there any limit in the control card for omiting the records?. Because we created a dynamic control card with 1800 records to be omitted but the SORT failed with error message EXCESS CARDS in SYSOUT.

Please clarify the following
1. Does that means SORT can't handle more than the specified limit, If so let me know the limit.
2. What is the alternate way of fullfilling the requirement?

Thanks in advance
Kavi
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Wed Jan 17, 2007 9:18 am    Post subject: Reply with quote

Quote:

Is there any limit in the control card for omiting the records?. Because we created a dynamic control card with 1800 records to be omitted but the SORT failed with error message EXCESS CARDS in SYSOUT.


Kavi,

Ofcourse there is a limit for sysin cards. However if your intention is to get the unmatched records then there are many ways to do it.

What is the version of sort product do you have ?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


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

PostPosted: Wed Jan 17, 2007 12:18 pm    Post subject: Reply with quote

DFSORT does not have a limit on the number of SYSIN statements, but it does have a limit on the number of INCLUDE/OMIT conditions that varies with the length and format of the fields. For this situation, the limit is a bit over 1700 conditions. And you can extend that limit by using IFTHEN clauses as explained for DFSORT's message ICE151A:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CM20/2.2.147?SHELF=&DT=20060721170811&CASE=

However, the 'EXCESS CARDS in SYSOUT' message indicates you're using Syncsort, not DFSORT.
_________________
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
kavi
Beginner


Joined: 15 Sep 2006
Posts: 64
Topics: 22

PostPosted: Thu Jan 18, 2007 9:54 am    Post subject: Reply with quote

Hi

Thanks for all your replies.
we have V1R2 SYNCSORT product in our shop. Please let me know the alternate ways.

Thanks
Kavi
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Thu Jan 18, 2007 10:20 am    Post subject: Reply with quote

Quote:

we have V1R2 SYNCSORT product in our shop. Please let me know the alternate ways.


Kavi,

Look at the first line in your sysout and tell us the exact version of syncsort

ex: the first line would be as follows
Code:

SYNCSORT FOR Z/OS  1.2.1.1R


In order to provide you with an alternate solution post in detail about the requirement.

1. What are the DCB properties of the 2 files?
2. What is the position and format of the field to be compared and omitted/included?
3. Post a sample of input and desired output

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
amargulies
Beginner


Joined: 10 Jan 2007
Posts: 123
Topics: 0

PostPosted: Thu Jan 18, 2007 12:36 pm    Post subject: Reply with quote

Quote:

Is there any limit in the control card for omiting the records?. Because we created a dynamic control card with 1800 records to be omitted but the SORT failed with error message EXCESS CARDS in SYSOUT.


Kavi,

The restriction SyncSort has is the amount of storage used to parse the control cards. This is MINCORE, and can be specified as a runtime parameter to override your installation default.

In regards to your original question, we are working on an alternate solution for you, but for the meantime, Kolusu's solution will get the job done.
_________________
Alissa Margulies
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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