Page 1 of 1

Explanation for the Bind card parameters.

PostPosted: Tue Nov 11, 2008 3:20 pm
by karthi_ind
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...

Re: Misc questions from interview

PostPosted: Wed Nov 12, 2008 6:57 am
by dick scherrer
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?

Re: Misc questions from interview

PostPosted: Wed Nov 12, 2008 12:24 pm
by karthi_ind
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.

Re: Misc questions from interview

PostPosted: Thu Nov 13, 2008 12:46 am
by dick scherrer
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

Re: Misc questions from interview

PostPosted: Fri Nov 14, 2008 10:46 am
by karthi_ind
Thanks Dick.

Could you please explain why the output is 123M.

Thanks...

Re: Misc questions from interview

PostPosted: Fri Nov 14, 2008 11:39 am
by dick scherrer
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.

Re: Misc questions from interview

PostPosted: Tue Nov 25, 2008 5:50 pm
by karthi_ind
Thanks Dick.

Re: Misc questions from interview

PostPosted: Wed Nov 26, 2008 2:15 am
by dick scherrer
You're welcome :)

d