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 

need to convert PD field in input file to CH filed in output

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
kpmdreamz
Beginner


Joined: 06 Apr 2007
Posts: 8
Topics: 2

PostPosted: Mon May 21, 2007 9:42 am    Post subject: need to convert PD field in input file to CH filed in output Reply with quote

hi all,
i have an input file with a field of 9(13) comp 3. (occupying 7 bytes)
I need to move it to an output file which defines the same field as
PIC X(13).
How do i do it.
Currently when i was using OUTREC FIELDS=(1,7,5X) it moves the values into the first 7 character of output.
for example 9913598251505 is moved as
X'9913598251505F404040404000'
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: Mon May 21, 2007 9:44 am    Post subject: Reply with quote

kpmdreamz,

Code:

 OUTREC FIELDS=(1,7,PD,EDIT=(TTTTTTTTTTTTT))


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


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Mon May 21, 2007 9:46 am    Post subject: Reply with quote

Well, if you are trying to use SORT then this should be in the Utilities. If a progam then in the programming Languages section, if a Rexx program then the TSO section but NO WAY in JCL.

In sort you use an edit mask I believe - I'm a bit hazy on that but I think that is the place to look in the manual.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
kpmdreamz
Beginner


Joined: 06 Apr 2007
Posts: 8
Topics: 2

PostPosted: Mon May 21, 2007 10:21 am    Post subject: Reply with quote

Thanks kolusu,

it works but i just don't know what it is Rolling Eyes

i also tried
OUTREC FIELDS=(1,7,PD,TO=ZD)
which gave the required result.
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: Mon May 21, 2007 10:45 am    Post subject: Reply with quote

Quote:

Thanks kolusu,
it works but i just don't know what it is
i also tried
OUTREC FIELDS=(1,7,PD,TO=ZD)
which gave the required result.


kpmdreamz,

I just used an edit mask to expand the packed decimal field. Check this link for various Edit Masks


PD to ZD also works but your output field will have sign overpunch on the last byte.

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


Joined: 06 Apr 2007
Posts: 8
Topics: 2

PostPosted: Tue May 22, 2007 12:36 am    Post subject: Reply with quote

thanks for the info kolusu.
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 -> Job Control Language(JCL) 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