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
 
Two questions about file.

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

New User


Joined: 03 Nov 2005
Posts: 46
Location: Shanghai, China

PostPosted: Tue Nov 22, 2005 8:15 am    Post subject: Two questions about file.
Reply with quote

Question: Which one of the following is a reason to use READ filename INTO working-storage-record when using control breaks?
Choice 1
At EOF, input fields are still available for processing.
Choice 2
Checking for EOF is unnecessary.
Choice 3
Total fields can be defined as part of the working-storage-record.
Choice 4
Numeric fields can be summed into total fields.
Choice 5
Numeric edited fields cannot be moved from file buffers.


Code:
PROCEDURE DIVISION.
   
MAINLINE.
 OPEN INPUT I-SALES-FILE
     OUTPUT O-REPORT-FILE

 SET S-SALES-NOT-EOF      TO TRUE
 PERFORM S0100-PROCESS
     UNTIL S-SALES-EOF
 END-PERFORM
 
 CLOSE I-SALES-FILE
     O-REPORT-FILE
 GOBACK.

S0100-PROCESS.
 READ I-SALES-FILE
    AT END
      SET S-SALES-EOF TO TRUE
 END-READ   
 MOVE SPACES              TO O-REPORT-REC
 MOVE I-SALES-NUM         TO O-REPORT-SALES-NUM
 MOVE I-SALES-NAME        TO O-REPORT-SALES-NAME
 WRITE O-REPORT-REC.

Question: The input file contains one record and then the EOF. There is an error in the processing logic above. Which one of the following lists the statements in the order in which they are executed when processing this file?
Choice 1
OPEN, SET, PERFORM S0100, READ (FIRST) , MOVE, MOVE, MOVE, WRITE, PERFORM S0100, READ (EOF), PERFORM (CONDITION IS MET), CLOSE, GOBACK
Choice 2
OPEN, SET, PERFORM S0100, READ (FIRST) , MOVE, MOVE, MOVE, WRITE, PERFORM S0100, READ (EOF), MOVE, MOVE, MOVE, WRITE, CLOSE, GOBACK
Choice 3
OPEN, SET, PERFORM S0100, READ (FIRST) , MOVE, MOVE, MOVE, WRITE, PERFORM S0100, READ (EOF), MOVE, MOVE, MOVE, WRITE, PERFORM (CONDITION IS MET), CLOSE, GOBACK
Choice 4
OPEN, SET, PERFORM S0100, READ (FIRST) , MOVE, MOVE, MOVE, WRITE, PERFORM S0100, READ (EOF), CLOSE, GOBACK
Choice 5
OPEN, SET, PERFORM S0100, READ (FIRST) , MOVE, MOVE, MOVE, WRITE, PERFORM S0100 (CONDITION IS MET), CLOSE, GOBACK
Back to top
View user's profile Send private message

khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Tue Nov 22, 2005 10:23 am    Post subject: Files
Reply with quote

hi frnd,
for the question 1 choice 3 will work.( Total fields can be defined as part of the working-storage-record. ) since the working storage section will contain the field names such that for manipulation of the records.
for question2 i m confused. let me know if any solution.
Back to top
View user's profile Send private message
sungang77

New User


Joined: 03 Nov 2005
Posts: 46
Location: Shanghai, China

PostPosted: Tue Nov 22, 2005 11:07 am    Post subject: Re: Files
Reply with quote

khamarutheen wrote:
hi frnd,
for the question 1 choice 3 will work.( Total fields can be defined as part of the working-storage-record. ) since the working storage section will contain the field names such that for manipulation of the records.
for question2 i m confused. let me know if any solution.


OK. I will, khamarutheen.
Thanks.
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 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 Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

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