Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Record keys incomplete...

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
Author Message
TICTAC

New User


Joined: 25 Apr 2005
Posts: 1
Location: Earth

PostPosted: Mon Apr 25, 2005 9:38 am    Post subject: Record keys incomplete...
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
References
sivatechdrive

Active User


Joined: 17 Oct 2004
Posts: 168
Location: hyderabad

PostPosted: Mon Apr 25, 2005 11:44 am    Post subject:
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1