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

Record keys incomplete...


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
TICTAC

New User


Joined: 25 Apr 2005
Posts: 1
Location: Earth

PostPosted: Mon Apr 25, 2005 9:38 am
Reply with quote

hello guys... i am working on a vsam file... supposed i declared this in my code...
Code:



       ENVIRONMENT DIVISION.                                             
       CONFIGURATION SECTION.                                           
       SOURCE-COMPUTER. IBM-3033.                                       
       OBJECT-COMPUTER. IBM-3033.                                       
       INPUT-OUTPUT SECTION.                                             
       FILE-CONTROL.                                                     
           SELECT VSAM-PROTYPE-FILE                                     
              ASSIGN VSAMPROT                                           
              ORGANIZATION IS INDEXED                                   
              ACCESS MODE  IS DYNAMIC                                   
              RECORD KEY   IS DATA-KEY                                   
              FILE STATUS  IS STATUS-CODE                               
                              VSAM-STATUS.                               
      ******************************************************************
      *                                                                *
      *                       DATA DIVISION                            *
      *                                                                *
      ******************************************************************
       DATA DIVISION.                                                   
       FILE SECTION.                                                     
       FD  VSAM-PROTYPE-FILE                                             
           RECORD CONTAINS 65 CHARACTERS.                               
       01  FD-FILE-RECORD.                                               
      ** INDICATE RECORD LAYOUT BELOW                                   
           10  DATA-KEY.                                                 
             15  EMP-NUM                                PIC 9(10).       
             15  LAST-NAME                              PIC X(25).       
             15  TEAM                                   PIC X(10).       
           10  DATA-GRP.                                                 
             15  FIRST-NAME                             PIC X(20).       
 

i only have values for EMP-NUM and TEAM... how can i get all the records that has the same EMP-NUM and TEAM in the VSAM file...

thanks!
Back to top
View user's profile Send private message
sivatechdrive

Active User


Joined: 17 Oct 2004
Posts: 191
Location: hyderabad

PostPosted: Mon Apr 25, 2005 11:44 am
Reply with quote

Hi Friend

i am sure sure whether there is any such sort of arrangements in vsam to get the duplicates


alternatively

Do a sort on the file based on EMP-NUM .

Read the file,from the 2nd read,check for the sondition whether the current EMP-NUM, TEAM are equal to that of previous record , write the data to a seperate file


Regards
siva
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 8
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
Search our Forums:

Back to Top