Explanation for the Bind card parameters.



Explanation for the Bind card parameters.

Postby karthi_ind » Tue Nov 11, 2008 3:20 pm

Hi All,

Please answer the following questions

1. Explanation for the Bind card parameters.

2. By using which utility we can create a PDS and what are all the parameters
needs to be passed for this.

3. A file has 10000 records and the job has already processed 2000 records and inserted it in a db2 table and suddenly due to duplicate rows that job got abends. How can we start proceeding from 2001th record.
we can use restart logic like storing the processed records in a PS file and refering the records once the job abends. But I need exact coding for this and how can we achieve this.

4. Whether we can declare as below
01 A pic s9(2)v99 COMP value -12.34

01 A pic s9(2)v99 value -12.34, if we display this variable A what will be the value for that.

Thanks in Advance...
karthi_ind
 
Posts: 12
Joined: Tue Nov 04, 2008 2:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Misc questions from interview

Postby dick scherrer » Wed Nov 12, 2008 6:57 am

Hello,

You can read as easily as we can. . .

1. Start here and read as much as you need:
http://publibz.boulder.ibm.com/cgi-bin/ ... ncrj10/1.2?

2. A pds may be created using jcl:
http://publibz.boulder.ibm.com/cgi-bin/ ... /12.55.2.1?

3.
we can use restart logic like storing the processed records in a PS file and refering the records once the job abends. But I need exact coding for this and how can we achieve this.
You have the right idea. There is no "exact coding" to be posted - restart/recovery is site-specific and anyone who intends to implement this must fillow the site standards.

4. A pic s9(2)v99 COMP value -12.34 can be defined (afaik, though it is not a good use of binary). Is the next "A" supposed to have the same definition or is the definition intentionally different?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Misc questions from interview

Postby karthi_ind » Wed Nov 12, 2008 12:24 pm

Hi Dick,

thanks a lot for your quick response.

For the first question I need explanation for each and every bind parameters. Could you please send me the link
for this ?

For the last one I have given another declaration as
01 A pic s9(2)v99 value -12.34 (without comp)

so if i give display A, what will be the value for A.

Thanks dick.
karthi_ind
 
Posts: 12
Joined: Tue Nov 04, 2008 2:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Misc questions from interview

Postby dick scherrer » Thu Nov 13, 2008 12:46 am

Hello,

Could you please send me the link for this ?
That is the first link i sent. You have to move around in the manual on your own. . . Suggest you start wth the Table of Contents (the little open book at the top left) as well as using the search function in the manual.

so if i give display A, what will be the value for A.
123M
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Misc questions from interview

Postby karthi_ind » Fri Nov 14, 2008 10:46 am

Thanks Dick.

Could you please explain why the output is 123M.

Thanks...
karthi_ind
 
Posts: 12
Joined: Tue Nov 04, 2008 2:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Misc questions from interview

Postby dick scherrer » Fri Nov 14, 2008 11:39 am

Hello,

This
01 A pic s9(2)v99
is a signed 4-byte zoned decimal numeric number.

The value -12.34 fills the 4 positions and the rule for zoned decimal is that the sign (plus/minus) is indicated by the high-order nibble of the low-order byte. Zoned decimal numbers take one byte each, so all but the digit with the sign are stored as F0 thru F9. So the first 3 digits of your field contain:
FFF
123
So far so good. Now for the sign digit. The number of the sign digit is 4 and the sign must be placed in this digit as well. Because this is a negative value, the sign is D, giving D4 as the value of the 4th byte.
FFFD
1234
Keep in mind that there is an implied decimal which is not visable, but is used in calculations. When a zoned-decimal value of -12.34 is displayed, 123M is the result.

When you work with zoned decimal numbers, a sign nibble of C signifies positive, D signifies negative, and F signifies implied positive.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Misc questions from interview

Postby karthi_ind » Tue Nov 25, 2008 5:50 pm

Thanks Dick.
karthi_ind
 
Posts: 12
Joined: Tue Nov 04, 2008 2:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Misc questions from interview

Postby dick scherrer » Wed Nov 26, 2008 2:15 am

You're welcome :)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to Interview Questions

 


  • Related topics
    Replies
    Views
    Last post