MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Cobol/DB2/JCL interview Questions

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Interview Q & A
View previous topic :: View next topic  
Author Message
sreelatha_mf
Beginner


Joined: 07 Aug 2006
Posts: 3
Topics: 3

PostPosted: Sun Aug 27, 2006 11:08 am    Post subject: Cobol/DB2/JCL interview Questions Reply with quote

1. Can we move comp values to comp-3 values

2. How do u know that diff applications r using the same database.??
How do u know that the particular field is used in which table??

3. What happens when time parameter is given in both job and step?
Back to top
View user's profile Send private message
shekar123
Advanced


Joined: 22 Jul 2005
Posts: 525
Topics: 89
Location: Bangalore India

PostPosted: Sun Aug 27, 2006 11:41 am    Post subject: Reply with quote

sreelatha_mf,

Yes we can move values from COMP to COMP-3 variables.

Try this code for positive numbers:
Code:

       01 COMP-VARIABLE01  PIC S9(4)      COMP VALUE 1234.             
       01 COMP3-VARIABLE01 PIC S9(6)V9(2) USAGE COMP-3.                 
       PROCEDURE DIVISION.                                             
       0000-MAIN.                                                       
           MOVE COMP-VARIABLE01 TO COMP3-VARIABLE01.                   
           DISPLAY 'COMP3-VARIABLE01 IS ' COMP3-VARIABLE01.             

OUTPUT
Code:

COMP3-VARIABLE01 IS 00123400

Try this code for negative numbers:
Code:

       01 COMP-VARIABLE01  PIC S9(4)      COMP VALUE -1234.             
       01 COMP3-VARIABLE01 PIC S9(6)V9(2) USAGE COMP-3.                 
       PROCEDURE DIVISION.                                             
       0000-MAIN.                                                       
           MOVE COMP-VARIABLE01 TO COMP3-VARIABLE01.                   
           DISPLAY 'COMP3-VARIABLE01 IS ' COMP3-VARIABLE01.             

OUTPUT
Code:

COMP3-VARIABLE01 IS 0012340}


Check this link for interpreting zoned numbers.Hope this helps.

http://www.mvsforums.com/helpboards/viewtopic.php?t=6889&highlight=sheet

2.

If you have a field by name EMPNO and you know the table in which the field resides then you can run the query below:
Code:

SELECT * FROM SYSIBM.SYSCOLUMNS WHERE TBNAME = 'SHEKAREMP';               
---------+---------+---------+---------+---------+---------+---------+-----
NAME                TBNAME              TBCREATOR   COLNO  COLTYPE   LENGTH
---------+---------+---------+---------+---------+---------+---------+-----
EMPNO               SHEKAREMP             SHEKAR        1  CHAR           6

OR

If you need to know the field EMPNO is present in which all tables then run the following query which will list out all the Table Names (TBNAME) which will contain the field description.
Code:

SELECT * FROM SYSIBM.SYSCOLUMNS WHERE NAME = 'EMPNO';


3. If the TIME parameter is coded on both the JOB and EXEC statements,then the TIME parameter on the EXEC statement will override the TIME parameter on the JOB statement.
_________________
Shekar
Grow Technically
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Interview Q & A All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group