IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

conversion of pic class value to fixed bin


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
krishnanvenugopal

New User


Joined: 24 May 2006
Posts: 1

PostPosted: Wed May 24, 2006 4:52 pm
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
k_vikram07

New User


Joined: 23 Nov 2005
Posts: 35

PostPosted: Fri Jun 09, 2006 4:44 pm
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
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts Pulling a fixed number of records fro... DB2 2
No new posts 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts file manager is doing string conversion IBM Tools 3
Search our Forums:

Back to Top