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

Need to copy based on keys


IBM Mainframe Forums -> JCL & VSAM
Post new topic   This topic is locked: you cannot edit posts or make replies.
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Mar 08, 2013 1:15 pm
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

Global Moderator


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

PostPosted: Fri Mar 08, 2013 1:49 pm
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

Superior Member


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

PostPosted: Fri Mar 08, 2013 1:52 pm
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: 8797
Location: Welsh Wales

PostPosted: Fri Mar 08, 2013 1:56 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Mar 08, 2013 1:58 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Mar 08, 2013 2:36 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Mar 08, 2013 2:37 pm
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: 8797
Location: Welsh Wales

PostPosted: Fri Mar 08, 2013 3:09 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Mar 08, 2013 3:13 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Mar 08, 2013 3:46 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Mar 08, 2013 3:49 pm
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

Superior Member


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

PostPosted: Sat Mar 09, 2013 3:14 pm
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. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Use input file with OMIT rcd keys? DFSORT/ICETOOL 15
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts DB2 Table - Image copy unload IBM Tools 2
Search our Forums:

Back to Top