Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
Create & Process a Vsam-esds Sequential File in Cobol

Create & Process a Vsam-esds Sequential File in Cobol

Ratings: (0)|Views: 12|Likes:
Published by sati1987

More info:

Published by: sati1987 on Nov 29, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less

06/16/2014

pdf

text

original

 
ESDS FILE MANIPULATIONAIM: CREATE & PROCESS A VSAM-ESDS/SEQUENTIAL FILE IN COBOL****** ***************************** Top of Data **************************************IDENTIFICATION DIVISION.PROGRAM-ID. MACESDS.ENVIRONMENT DIVISION.INPUT-OUTPUT SECTION.FILE-CONTROL.SELECT MAC ASSIGN TO AS-ESDSFILE.DATA DIVISION.FILE SECTION.FD MAC.01 MREC.05 MNO PIC 9(5).05 MNAME PIC X(10).WORKING-STORAGE SECTION.01 A PIC 99 VALUE ZERO.01 B PIC 9(5) VALUE ZERO.PROCEDURE DIVISION.0001.***** DISPLAY "ENTER 1.SEARCH/2.INSERT/3.REWRITE/4.DEL/5.DEL ALL 6.DISP".ACCEPT A.IF A = 1 GO 1SEARCHELSE IF A = 2 GO 2WRITEELSE IF A = 3 GO 3REWRITEELSE IF A = 4 GO 4DELETEELSE IF A = 5 GO 5DELALLELSE IF A = 6 GO 6DISPLAYELSE DISPLAY "INVALID INPUT"GO 0001.STOP RUN.1SEARCH.OPEN INPUT MAC.*****DISPLAY "ENTER RECORD NO TO BE SEARCHED".ACCEPT B.0002.READ MAC AT END DISPLAY B "NOT FOUND", GO000X.IF B = MNO DISPLAY "FOUND " MNO ":" ,DISPLAY " AT POS:" A " FOR NAME: " MNAME,GO 000X.ADD 1 TO A.GO TO 0002.2WRITE.OPEN EXTEND MAC.ACCEPT MNO.ACCEPT MNAME.WRITE MREC.GO 000X.3REWRITE.OPEN I-O MAC.*****DISPLAY "ENTER RECORD NO TO BE REWRITED".ACCEPT B.0003.READ MAC AT END DISPLAY "MNO NOT FOUND" GO 000X.IF MNO NOT = B GO 0003.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->