Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
conversion of pic class value to fixed bin

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & ASSEMBLER
Author Message
krishnanvenugopal

New User


Joined: 24 May 2006
Posts: 1

PostPosted: Wed May 24, 2006 4:52 pm    Post subject: conversion of pic class value to fixed bin
Reply with quote

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.....
Back to top
View user's profile Send private message
References
k_vikram07

New User


Joined: 23 Nov 2005
Posts: 34

PostPosted: Fri Jun 09, 2006 4:44 pm    Post subject:
Reply with quote

could u please explain with output example.
Back to top
View user's profile Send private message
lalgv

New User


Joined: 19 Apr 2006
Posts: 2

PostPosted: Mon Jun 12, 2006 2:15 pm    Post subject: Re: conversion of pic class value to fixed bin
Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & ASSEMBLER All times are GMT + 6 Hours
Page 1 of 1