krishnanvenugopal
New User
Joined: 24 May 2006 Posts: 1
|
|
|
|
when i attempt to convert a pic class value (pic (10)9) into a fixed bin(31,0) 4 blanks r getting padded up to the left of the pic value in fixed bin
eg:
PARSER1: PROC OPTIONS(MAIN);
DCL 1 INPUT1,
2 INPUT_AREA,
5 ACCT_NUM PIC '(10)9' INIT('5000000231'),
2 OUTPUT_BAL,
5 BAL_AMT PIC '(8)S9V(2)9' INIT('50000000.12'),
2 OUTPUT_TRN,
5 TRAN_ID CHAR(10) INIT ('NUTAKKIMUR');
DCL 1 OUT_DATA,
2 INPUT_AREA,
5 ACCT_NUM FIXED DEC (11,0),
2 OUTPUT_BAL,
5 BAL_AMT FIXED DEC(10,2),
2 OUTPUT_TRN,
5 TRAN_ID CHAR(10);
OUT_DATA = INPUT1,BY NAME;
PUT SKIP LIST(INPUT1.INPUT_AREA.ACCT_NUM);
PUT SKIP LIST(OUT_DATA);
in out data the value is obtained padded with 4 blanks to its left
kindly help..... |
|
lalgv
New User
Joined: 19 Apr 2006 Posts: 2
|
|
|
|
INPUT1 record length is (
INPUT1.ACCT_NUM - 10 bytes,
INPUT1.OUTPUT_BAL - 10 bytes,
INPUT1.OUTPUT_TRN - 10 bytes.
Then record length of INPUT1 is 30 bytes.
OUT_DATA.ACCT_NUM - 6 bytes,
OUT_DATA.OUTPUT_BAL - 10 bytes,
OUT_DATA.OUTPUT_TRN - 10 bytes.
Then record length of OUT_DATA is 26 bytes.
INPUT1 record length is 30 bytes and OUT_DATA record length is 26 bytes.
Because of 4 bytes difference, you are getting 4 blanks in the OUT_DATA record. |
|