Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
File operation error

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
sakthisiga
Warnings : 1

New User


Joined: 11 Jun 2009
Posts: 60
Location: Chennai

PostPosted: Tue Aug 11, 2009 5:29 pm    Post subject: File operation error
Reply with quote

Code:
0100 INITIAL-READ.
0110    READ MASTER-FILE
0120        AT END MOVE 'Y' TO MASTER-EOF-SW.
0130    READ TRANSACTION-FILE
0140        AT END MOVE 'Y' TO TRANSACTION-EOF-SW.
0150    PERFORM PROCESS-FILE
0160        UNTIL END-OF-MASTER OR
0170              END-OF-TRANSACTIONS.
0180    GOBACK.
0190 PROCESS-FILE.
0200    PERFORM UNTIL MASTER-KEY >= TRANSACTION-KEY
0210        WRITE MASTER-RECORD
0220        READ MASTER-RECORD AT END MOVE 'Y' TO MASTER-EOF-SW
0230    END-PERFORM.
0240    IF NOT MASTER-EOF
0250        EVALUATE TRUE
0260            WHEN TRANSACTION-IS-DELETE
0270                PERFORM DELETE-MASTER
0280            WHEN TRANSACTION-IS-ADD
0290                PERFORM ADD-MASTER
0300            WHEN TRANSACTION-IS-UPDATE
0310                PERFORM UPDATE-MASTER
0320        END-EVALUATE.
0330 DELETE-MASTER.
0340    IF MASTER-KEY <> TRANSACTION-KEY
0350        DISPLAY '??????'
0360        WRITE MASTER-RECORD.
0370    READ MASTER-FILE AT END MOVE 'Y' TO MASTER-EOF-SW.
0380    PERFORM GET-NEXT-TRANSACTION.
0390 ADD-MASTER.
     ...
0460 UPDATE-MASTER.
     ...
0540 GET-NEXT-TRANSACTION.
     ... 
Code'd
This is a tape-based master-transaction program segment. Assume the files are sorted into ascending sequence by key fields. Transactions may add, delete, or update master file records. Referring to statement #0350, what error, if any, has been detected?


Choice 1
There is no corresponding transaction record for the master record being processed following the initial read.
Choice 2
The master file is out of sequence.
Choice 3
A logic error has occurred.
Choice 4
The master record to be deleted does not exist.
Choice 5
The transaction file is out of sequence.




Can anyone please tell me which one is correct?
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Aug 11, 2009 5:39 pm    Post subject:
Reply with quote

No. The idea of interview questions is that you tell us what you think, and we help you from that point onwards.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Tue Aug 11, 2009 7:42 pm    Post subject:
Reply with quote

Please use BBCode (see FAQ) for readability. For example:
Code:
0100 INITIAL-READ.
0110     READ MASTER-FILE
0120         AT END MOVE 'Y' TO MASTER-EOF-SW.
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us