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
 

 

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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Viewing executing process in NDM .. q... Debb.Brant IBM Tools 0 Wed Dec 14, 2016 10:55 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm


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