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
 

 

Need to copy based on keys

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
shanth555

New User


Joined: 17 Aug 2012
Posts: 35
Location: India

PostPosted: Fri Mar 08, 2013 1:09 pm    Post subject: Need to copy based on keys
Reply with quote

Code:

Shanth123456789
Arvindk123456789
Aniesde123456789
Lokeshh123456789
Shanth9876543210


output shuould be
Code:

Shanth123456789
Shanth9876543210


Here i am not gonna use any INCLUDE condition to retrieve this output.

is there any other way to fetch the records from the file based on key (1,6)?

i would be grateful for your help.

Thanks.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Fri Mar 08, 2013 1:15 pm    Post subject: Reply to: Need to copy based on keys
Reply with quote

Do you mean you want to supply "dynamic values" to a process to extract data from your file, based on a key which is six characters long?

Have a look here for samples of JOINKEYS.

You could, for less "overhead" (the machine's, not yours), do a two-step process where the first generates the control cards necessary (INCLUDE) and the second actually uses them.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Fri Mar 08, 2013 1:49 pm    Post subject:
Reply with quote

If your version of product would support SYMNAMES probably you can make use of that as well and then could do it using INREC IFTHEN condition
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Mar 08, 2013 1:52 pm    Post subject:
Reply with quote

Could you be more cryptic in defining what you need and the rules to achieve that?

My interpretation is that you want just the first and last record from input? If yes, and you're using the version of SyncSort release supporting SUBSET then SynCTOOL's SUBSET would be a better choice, IMHO.
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: Fri Mar 08, 2013 1:56 pm    Post subject:
Reply with quote

You need to define the rules for data selection, so far at least two different possibilities exist, so unless you give definitive rules YOU are wasting the time of other forum members.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Fri Mar 08, 2013 1:58 pm    Post subject: Reply to: Need to copy based on keys
Reply with quote

Quote:
Here i am not gonna use any INCLUDE condition to retrieve this output.

pretty foggy remark !

if You just need the records for one key INCLUDE is the fastest way around it!
Back to top
View user's profile Send private message
shanth555

New User


Joined: 17 Aug 2012
Posts: 35
Location: India

PostPosted: Fri Mar 08, 2013 2:30 pm    Post subject:
Reply with quote

If we give INCLUDE condition it will fetch the records based on condition.

For Example: INCLUDE=(1,6,EQ,CH,C'Shanth')

But my expectation is without giving any condition. It should it read the key(1,6) and fetch the same records.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Fri Mar 08, 2013 2:36 pm    Post subject: Reply to: Need to copy based on keys
Reply with quote

and by grace how in hell do You choose the key to be <extracted>
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Fri Mar 08, 2013 2:37 pm    Post subject: Reply to: Need to copy based on keys
Reply with quote

topic is going to be locked very shortly for stupidity icon_cool.gif
done
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: Fri Mar 08, 2013 3:09 pm    Post subject:
Reply with quote

shanth555 wrote:
But my expectation is without giving any condition. It should it read the key(1,6) and fetch the same records.
So you must be running z/OS psychic 2.4, where the system knows exactly what you want without you even having to tell it what you want

icon_cry.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Fri Mar 08, 2013 3:13 pm    Post subject: Reply to: Need to copy based on keys
Reply with quote

probably the TS is a follower of
Quote:
"The z900 knows what you need before you do,"
said Dan Colby general manager, Enterprise Servers, IBM.
- Quoted from IBM Reinvents Mainframe and Marketplace


the above is the hardware implementation of zVU ( z Virtual Universe )
where one program is enough for all needs

Code:
//justdoit  exec pgm=iehprophet
//steplib dd disp=shr,dsn=sys1.&deity


since iehprophet knows, no need for control cards nor other dd statements
and as a true deadline anybody can expect a 7 days elapsed
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Fri Mar 08, 2013 3:46 pm    Post subject: Reply to: Need to copy based on keys
Reply with quote

I think it is a "language barrier" thing.

I think it is "I don't know the key at the time I write the Control Cards, so will have it on a file".

Generating the Control Cards (generating the INCLUDE), generating symbols/SYMNAMES (and use the symbol in the INCLUDE) or JOINKEYS can do do what you want, if that is the case. As has already been mentioned, so I don't know if that is what you want.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Fri Mar 08, 2013 3:49 pm    Post subject: Reply to: Need to copy based on keys
Reply with quote

I unlocked the topic but ...

Quote:
I think it is "I don't know the key at the time I write the Control Cards, so will have it on a file".


ok for the language barrier but sometimes the TSs assume too much

and I asked
Quote:
and by grace how in **** do You choose the key to be <extracted>



I just checked the other topics from the same TS
no one reached a conclusion, the TS just disappeared after a while
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Sat Mar 09, 2013 3:14 pm    Post subject:
Reply with quote

I'm also not sure if that really serves some business need... . icon_neutral.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 1 Fri Dec 02, 2016 9:47 am
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
This topic is locked: you cannot edit posts or make replies. Job to wait and continue based on reply yugendran COBOL Programming 5 Wed Oct 05, 2016 1:46 pm


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