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 

Can I convert customer format edit(TTTTT.TTT) back to PD?

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


Joined: 10 Dec 2005
Posts: 159
Topics: 75

PostPosted: Thu Apr 16, 2009 10:44 pm    Post subject: Can I convert customer format edit(TTTTT.TTT) back to PD? Reply with quote

As subject.

I am now doing
first
Quote:
inrec
to removed decimal point, by match byte by byte
then use
Quote:
to=PD
to convert ZD to PD.

input:
Code:
123456789111.88;123456789111.77;123456789111.66;123456789111.55;..........


Code:
  INREC FIELDS=(1,46,47,13,61,3,64,13,78,3,81,13,95,3,98,13,112,3,     
                115,13,129,3,132,13,146,3,149,13,163,3,166,13,         
                180,3,183,13,197,3,200,13,214,3,217,13,231,3,234,13,   
                248,3,251,13,265,3,268,13,282,3,285,13,299,3,302,13,   
                316,3,319,13,333,3,336,8,345,6)                         
  OUTREC FIELDS=(1,3,ZD,TO=BI,LENGTH=1,5,2,8,4,13,4,18,2,21,8,30,8,     
                 39,1,41,5,                                             
                 47,15,ZD,TO=PD,63,15,ZD,TO=PD,                         
                 79,15,ZD,TO=PD,95,15,ZD,TO=PD,                         
                111,15,ZD,TO=PD,127,15,ZD,TO=PD,                       
                143,15,ZD,TO=PD,159,15,ZD,TO=PD,                       
                175,15,ZD,TO=PD,191,15,ZD,TO=PD,                       
                207,15,ZD,TO=PD,223,15,ZD,TO=PD,                       
                239,15,ZD,TO=PD,255,15,ZD,TO=PD,                       
                271,15,ZD,TO=PD,287,15,ZD,TO=PD
                303,15,ZD,TO=PD,319,14)   

For example:
Code:
64,13,78,3

64,13+ '.' + 2 decimal = TTTTTTTTTTTTT.TT

Is there any better choice to do this?
Back to top
View user's profile Send private message Send e-mail MSN Messenger
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Apr 16, 2009 11:39 pm    Post subject: Reply with quote

issac1029,

You made it way complicated. You can use UFF (unsigned free format) to remove the comma and decimal point. If you have signed numbers then use SFF format.

Code:

//SYSIN   DD *
  SORT FIELDS=COPY
  OUTREC BUILD=(p,m,UFF,PD,length=n)
/*
//****************************************
//* p = pos of the field                 *
//* m = length of your numeric field     *
//* n = length of your pd length         *
//****************************************

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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