MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Packed decimal not displaying in the correct position

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
mfuser
Banned


Joined: 01 Mar 2005
Posts: 105
Topics: 58

PostPosted: Thu Sep 07, 2006 11:58 am    Post subject: Packed decimal not displaying in the correct position Reply with quote

Members,

I have an input record which contains 4 fields and they are :

1-2 character AB
3-10 numeric 99999999
11-18 packed decimal some values (15,2)
19-26 packed decimal some values (15,2)

I want to select the fields from 19-26 first which is packed decimal to an output report in first line and then numeric fields 3-10 in the second line.
The value in the packed decimal when i saw in ZD is 000000012345678
Code:

+123,456.78
99999999

But when i try the code below i am getting the output in the first line after 10 spaces that is the output is starting after 10 columns but the second output is coming correctly.Please help me out.
Code:

----+----1----+----2-
*********************
          +123,456.78
99999999             

JCL
Code:

//SYSIN    DD *                                                         
   SORT FIELDS=COPY                                                     
   OUTFIL OUTREC=(1:19,8,PD,M4,/,             
                  1:3,8,80:X),REMOVECC                     
/*
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Sep 07, 2006 1:04 pm    Post subject: Reply with quote

mfuser,

M4 has edit mask has the following pattern

Code:

SII,III,III,III,III,III,III,III,III,IIT


So if you want only 8 byte field then you also need to specify the length parm.

ie
Code:

//SYSIN    DD *                                                         
   SORT FIELDS=COPY                                                     
   OUTFIL OUTREC=(1:19,8,PD,M4,LENGTH=8,/,             
                  1:3,8,80:X)
/*

you also don't need the REMOVECC parameter as you are not using the reporting features.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mfuser
Banned


Joined: 01 Mar 2005
Posts: 105
Topics: 58

PostPosted: Thu Sep 07, 2006 1:57 pm    Post subject: Reply with quote

Kolusu,

Thanks a lot for your help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group