View previous topic :: View next topic
|
Author |
Message |
SCARCEBOYZ
New User
Joined: 16 May 2005 Posts: 32 Location: Millenium Business Park, Mumbai
|
|
|
|
Hello All,
During a client interview, I was asked a very strange question that "How will you find length of a DB2 Variable" ? Though I answered that in DB2 we take the data from table so by seeing the table declaration we can tell the length of the field but interviewer was not satisfied?If anybody know the correct answer, please let me know?
Another question was "How do we know that a cics command has successfully executed". I answered "RESP" command.Please let me know if this is a correct answer?
Regards,
Vivek |
|
Back to top |
|
|
snehalpatel
New User
Joined: 13 Sep 2007 Posts: 37 Location: India
|
|
|
|
SCARCEBOYZ wrote: |
Hello All,
During a client interview, I was asked a very strange question that "How will you find length of a DB2 Variable" ? Though I answered that in DB2 we take the data from table so by seeing the table declaration we can tell the length of the field but interviewer was not satisfied?If anybody know the correct answer, please let me know?
Regards,
Vivek |
Hi
As per my knowledge, If the Column defination is for an VARCHAR, then we do have Length component with it.
EXEC SQL DECLARE TEST_A TABLE
(TEST_COL VARCHAR(900) NOT NULL
) END-EXEC.
then Corresponding cobol declaration would be
01 DCLTEST_A
10 TEST-COL.
49 TEST-COL-LEN PIC S9(4) USAGE COMP.
49 TEST-COL-TEXT PIC X(900).
At run time "TEST-COL-LEN " will have length of field
Regards,
Snehal Patel |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
2nd question: almost correct, you have to check the EIBRESP field (located in DFHEIBLK) |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
don't you have to include the RESP (and when wanted RESP2) parm in the CICS API CALL? |
|
Back to top |
|
|
SCARCEBOYZ
New User
Joined: 16 May 2005 Posts: 32 Location: Millenium Business Park, Mumbai
|
|
|
|
Yes..You need to .EIBRESP2 contains more detailed information that may help explain why the RESP condition occurred. This field contains meaningful values, as documented with each command to which it applies. For requests to remote files, EIBRESP2 contains zeros. If a program uses DPL to link to a program in another CICS region, an EIBRESP2 from the remote region is not returned to the program doing the DPL. |
|
Back to top |
|
|
|