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
 

 

Record keys incomplete...

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    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

sivatechdrive

Active User


Joined: 17 Oct 2004
Posts: 190
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm
No new posts PA02 - Programmtically control attent... dodithegreat IMS DB/DC 1 Thu Apr 06, 2017 8:33 pm


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