IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Generating Sort card


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Soundararajan

New User


Joined: 07 Jan 2007
Posts: 13
Location: INDIA

PostPosted: Tue Jul 07, 2009 3:07 am
Reply with quote

I need to write a rexx exec to create a sortcard.

My input dataset is as follows:

20090709......A....
20090709......B....
20080709......C....

Using the above input dataset, my sort card should be


SORT FIELDS=COPY
INCLUDE COND=(15,1,CH,EQ,C'A',OR,
15,1,CH,EQ,C'B',OR,
15,1,CH,EQ,C'C')


Number of record and value A, B and C will vary in the input file. So that i need to write sort card in runtime.

We need to keep the above said job in daily run proc, so when the job running for the next day, the previous day sort card should be cleaned and need to update newly, by using that days input dataset values.

Please help.

Soundar
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Jul 07, 2009 3:12 am
Reply with quote

Hello,

You need to provide some kind of clarification. . .

The "sort card" posted shows nothing but literals icon_confused.gif

Post a more representative set of sample data, the output you want from that input, and any "rules" for selecting some part of the input to the output.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Jul 07, 2009 6:59 am
Reply with quote

Hi,

why generate a sort card when all records are selected anyway ?



Gerry
Back to top
View user's profile Send private message
Soundararajan

New User


Joined: 07 Jan 2007
Posts: 13
Location: INDIA

PostPosted: Tue Jul 07, 2009 8:38 am
Reply with quote

Dick and Gerry,

Thank you.

Here after I am going to get a huge volume of data in one dataset.

using that, client is expecting the following,(as the volume of data is huge, client dont want to do two file matching):

1) First we need to extract unique company names from the user provided dataset (Eg A, B, C in my sort card), so we did this one by using simple sort card (sum fields = none). Daily the list of company will vary.
2) In second step, We need to write rexx step,based on the above (Step 1) to generate a sort card.
3) Using the sort card generated in step 2, we will retrieve data from master file in step 3. Like that the process is going....

Please let me know if you have any questions.

Thanks,
Soundar.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Jul 07, 2009 9:44 am
Reply with quote

Quote:
Here after I am going to get a huge volume of data in one dataset
Which sort product are your using? What if it's gonna create a huge sort card so that your sort product is unable to process the control card itself?.
Quote:
as the volume of data is huge, client dont want to do two file matching
Is n't this a bit strange. If you're using SYNCSORT, you can do this in 2 steps without having to create sort cards dynamically.
Step1. As mentioned by you
Step2. Match both the files using a SyncSort JOIN application.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Jul 07, 2009 9:53 am
Reply with quote

Hello,
Quote:

as the volume of data is huge, client dont want to do two file matching
Maybe i don't need to understand this, and (so far) i surely do not icon_smile.gif

If the data in 2 files is in the same key sequence, it is as fast (possibly faster) to match the 2 files as it is to pass the file, select a huge amount, and then do some processing on the extracted data.

Your request mentions generating a sort card, but it is not clear what the entire process will be. If we better understood the process, we might be able to offer more usable suggestions.

As Arun mentions, there is also the consideration of too many unique companies.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top