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

Distinct values in the field of particular Segment


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chandrakanth_s

New User


Joined: 15 Mar 2006
Posts: 13

PostPosted: Fri Aug 17, 2007 11:12 pm
Reply with quote

Hi,

Could any one let me know how to find the unique values in the field of any Segments. Please look the below example

Assume, I have 5 segments in a Database. One of the segments has patient-status field. I wanted to know what are the values that are stored in the Patient-status field of that particular segment.

Please let me know is there any way that I can find it out through IMS File-Aid or Kindly provide if you have any JCL to retrieve those values.

Regards,
Chandrakanth
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Sat Aug 18, 2007 1:19 am
Reply with quote

You need to extract or unload all segment occurances of that particular segment and then run a sort step to get distinct values for patient-status field.

You can check the File AId extract option by giving selection criteria


Or the other option is to know how the patient-status field is loaded in database, assuming that there should be some rules of how this status field should be updated.
Back to top
View user's profile Send private message
chandrakanth_s

New User


Joined: 15 Mar 2006
Posts: 13

PostPosted: Sat Aug 18, 2007 1:31 am
Reply with quote

Thanks for the information. Could you please let me know is there any batch JCL can be submitted through Fileaid to unload all the occurances of that segment.

Could you please pass on the steps to unload all the occurances to a flat file from any particualar segment through fileaid.
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Sat Aug 18, 2007 2:35 am
Reply with quote

Try below option:

Code:
 4  Extract/Load   Extract or load a data base or subset


Code:
1 Data Base Extract   Extract from a data base to a sequential file   


The options are self explanatory.
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 -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
Search our Forums:

Back to Top