IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

IFLEX-Interview Questions


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
suganthyprabha

New User


Joined: 28 Jul 2005
Posts: 58

PostPosted: Wed Oct 26, 2005 7:06 pm
Reply with quote

Hi Friends,

Foll are the interview questions i have faced.

1. I want to copy the records from flat file into Ksds file. But the Records are in unsorted manner. but i want to copy the records in the Sorted manner from PS to KSDS. How?

2. In an Array consider i am having 10 records how they are stored
while using Subscript and How to display 5 th element for both the
case of Subscript and INDEX.

3. I am having VSAM file, Application Program and JCL to execute that program. In this i have to change the Lrecl from 80 to 88. What all are the changes i have to do in the Application Program,Vsam File and Jcl.that 8 bytes should be in the middle only.
for ex: 1.............80 (before impact)
1.....40 41...48........88.

4. How the Sign bit is stored in Comp?

Can u please tell me how to do this.

Thanks and Regards,
suganthy.
Back to top
View user's profile Send private message
suganthyprabha

New User


Joined: 28 Jul 2005
Posts: 58

PostPosted: Wed Oct 26, 2005 7:20 pm
Reply with quote

Friends,

One more questions to add.

1. We know the use of With hold option. The cursor will be opened after Commit. How can i close the Cursor explicitly.

Cursor life cycle is:

1. OPEN 2. FETCH 3. CLOSE

I this during which operation the Cursor comes into picture that is it will be activated?
Back to top
View user's profile Send private message
sathish_rathinam

New User


Joined: 22 Aug 2005
Posts: 59
Location: india

PostPosted: Thu Oct 27, 2005 10:30 am
Reply with quote

hi suganthy,

1.use SORT FIELDS=COPY AND SORT FILELDS =(1,5,CH,A)
IN THE SYSIN DD *.
4.SIGN IS STORED IN MOST SIGNIFICANT BIT ,IF THE VALUE IS POSITIVE MSB IS 0 AND IF THE VALUE IS NEGATIVE IT IS 1.
3.CHANGE THE FILE SECTION STATEMENT LIKE RECORD CONTAINS 88 CHARACTERS.

REGARDS,
SATHISH
Back to top
View user's profile Send private message
ikumar

New User


Joined: 02 Aug 2005
Posts: 81

PostPosted: Thu Oct 27, 2005 11:30 am
Reply with quote

Answers to your cursor questions:
1) you have to close the curosr explicitly like,
EXEC SQL CLOSE cursor-name END-EXEC

2) To tell DB2 that you are ready to process the first row of the result table, execute the OPEN statement in your program. Execute an OPEN CURSOR to make the cursor available to the application.

Answers to ur questions in first post:
1) SORT on the key and use REPRO to copy from PS to KSDS file.
2) You can display 5th element using subscript like,
Move 5 to ws-sub1
DISPLAY WS-ARRAY(ws-sub1).

To calculate index: (occurance ? 1) * length of the element

4)In the most significant bit. Bit is ON if -ve, OFF if +ve.
Back to top
View user's profile Send private message
sathish_rathinam

New User


Joined: 22 Aug 2005
Posts: 59
Location: india

PostPosted: Thu Oct 27, 2005 12:02 pm
Reply with quote

hi,
for index ,set +5 to indexedvariable of indexby clause and display indexvariable(5) to get the 5th element.

i dont know whther there is standard formula as ikumar said.

regards,
sathish
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Comp interview questions Mainframe Interview Questions 5
No new posts Interview Questions on Cobol DB2 program Mainframe Interview Questions 5
No new posts The Last Two Question For You To Ask ... Mainframe Interview Questions 0
No new posts Mainframe Interview Questions CICS,CO... Mainframe Interview Questions 6
No new posts Viewing executing process in NDM .. q... IBM Tools 0
Search our Forums:

Back to Top