|
|
| Author |
Message |
ksk
Active User
Joined: 08 Jun 2006 Posts: 253 Location: Pune
|
|
|
|
Hi All,
In our SORT cards, I found the following code. Can anybody let me know what the below statement means?
OUTREC FIELDS=(1C'INSA',X'0000000000000C')
As for as I know 1st four characters of the output file will contain INSA. I read in Google about X'0000000000000C' is a 7 character field pd7. This could also have been written as 6Z,X'00'C, where 6Z is 6 binary zeroes.
But I didn't understand what exactly it performs.
Similarly I found X'0000076C'.
Regards,
KSK |
|
| Back to top |
|
 |
References
|
Posted: Mon May 05, 2008 3:29 pm Post subject: Re: Query on OUTREC Fields |
 |
|
|
 |
guptae
Moderator
Joined: 14 Oct 2005 Posts: 990 Location: Bangalore,India
|
|
|
|
Hello ksk,
It will insert X'0000000000000C' or X'0000076C' from 5th bytes . |
|
| Back to top |
|
 |
ksk
Active User
Joined: 08 Jun 2006 Posts: 253 Location: Pune
|
|
|
|
Hi Ekta,
Thanks for your prompt reply. X'0000000000000C' is a binary representation, so what value would be inserted.
In my case X'0000000000000C' was coded in OUTREC for a field which has been declared as s9(m)V9(n).
KSK |
|
| Back to top |
|
 |
acevedo
Active User
Joined: 11 May 2005 Posts: 265 Location: Spain
|
|
|
|
| Quote: |
| In my case X'0000000000000C' was coded in OUTREC for a field which has been declared as s9(m)V9(n). |
I guess you ment: s9(m)V9(n) COMP-3
x'0000000000000C' has a length of 7 ch.... match your Picture (m and n values) with that length? |
|
| Back to top |
|
 |
ksk
Active User
Joined: 08 Jun 2006 Posts: 253 Location: Pune
|
|
|
|
Hi
Yes it is a field of COMP-3. and it's declaration is S9(4)V9(9) COMP-3.
KSK |
|
| Back to top |
|
 |
acevedo
Active User
Joined: 11 May 2005 Posts: 265 Location: Spain
|
|
|
|
| if you code x'0000000000000C' in the outrec and you read that file with a field with picture S9(4)V9(9) COMP-3... the value of that field will be 0. |
|
| Back to top |
|
 |
ksk
Active User
Joined: 08 Jun 2006 Posts: 253 Location: Pune
|
|
|
|
Our input file has record length 79 and output has 480. this outrec filed is coming at 196-202 position in the output file.
My question is whether any value will be assigned from 196-202 in the output file because of this representation in OUTREC card? If so, what value would be assigned? |
|
| Back to top |
|
 |
ksk
Active User
Joined: 08 Jun 2006 Posts: 253 Location: Pune
|
|
|
|
Hi acevedo,
If 0 would be assigned for x'0000000000000C', what value would be assigned for X'0000076' and x'0000000000001C'? |
|
| Back to top |
|
 |
ksk
Active User
Joined: 08 Jun 2006 Posts: 253 Location: Pune
|
|
|
|
| Sory it's X'0000076C'. |
|
| Back to top |
|
 |
acevedo
Active User
Joined: 11 May 2005 Posts: 265 Location: Spain
|
|
|
|
In my humble opinion now it's your time to read the manuals and try yourself... ( I answered you becouse I didn't notice it was the DFSORT forum).
Good luck. |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Moderator
Joined: 15 Feb 2005 Posts: 4236 Location: San Jose, CA
|
|
|
|
KSK,
| Code: |
OUTREC FIELDS=(1C'INSA',X'0000000000000C')
|
This will create an 11-byte record with 'INSA' in positions 1-4 and a PD 0 value in positions 5-11.
| Quote: |
Our input file has record length 79 and output has 480. this outrec filed is coming at 196-202 position in the output file.
My question is whether any value will be assigned from 196-202 in the output file because of this representation in OUTREC card? If so, what value would be assigned? |
No, the output records will only be 11 bytes long. That's all the OUTREC statement creates. It's really not clear what you're trying to do here. If you wanted to create a 480 byte output record with 'INSA' in 1-4, a PD 0 in 196-202 and blanks in the rest of the record, the OUTREC statement for that would be:
| Code: |
OUTREC BUILD=(C'INSA',196:X'0000000000000C',480:X)
|
|
|
| Back to top |
|
 |
ksk
Active User
Joined: 08 Jun 2006 Posts: 253 Location: Pune
|
|
|
|
Frank,
Sorry for the confusion. We have many fields in between these 2 fiedls. As I explained in my query, INSA is in 1 to 4 position and we have some other information from 5 to 195 and from 196th colomn, x'0000000000000C' was starting.
We have some other field also in between as X'0000076'. I would like to know what value will be assigned for this representation in output file. Shall we do Hexadecimal conversion for this or how can we come to know the value that would be displayed in the output file for any other representation?
Regards,
KSK |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Moderator
Joined: 15 Feb 2005 Posts: 4236 Location: San Jose, CA
|
|
| Back to top |
|
 |
ksk
Active User
Joined: 08 Jun 2006 Posts: 253 Location: Pune
|
|
|
|
| Thanks Frank for your detailed explanation. |
|
| Back to top |
|
 |
|
|