Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

convertion of character to packed decimal

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
sudhee_rb

New User


Joined: 29 Mar 2006
Posts: 34

PostPosted: Tue Dec 19, 2006 8:27 pm    Post subject: convertion of character to packed decimal
Reply with quote

hi

This is sudheer

any body let mi give any ida on this query..


i hve one file with 19 chars of record length


in that 19 i wanted to convert position 14 and length 6 character to

14 , 4 packed decimal and iwanted to write in to another file...


give me the fd sort..fields..



thanks in advance\


sudheer
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Dec 19, 2006 9:38 pm    Post subject:
Reply with quote

You can use a DFSORT job like this:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT    DD SYSOUT=*
//SORTIN DD DSN=...  input file (FB/19)
//SORTOUT DD DSN=...  output file (FB/17)
//SYSIN    DD  *
  OPTION COPY
  INREC BUILD=(1,13,14,6,SFF,TO=PD,LENGTH=4)
/*



I used SFF (signed free form) format because you didn't say what the values in 14-19 look like. SFF will handle most values. You could use other formats depending on what the values actually look like, e.g. ZD for '01234'.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
This topic is locked: you cannot edit posts or make replies. DSList (3.4) cannot display Chinese c... jacobdng TSO/ISPF 4 Wed Oct 05, 2016 2:51 pm
No new posts Continuation Character ballaswaroop SYNCSORT 8 Thu Aug 25, 2016 4:46 pm
No new posts Adding a descending character to a file Steve Ironmonger DFSORT/ICETOOL 3 Fri Jul 15, 2016 4:57 pm
No new posts Moving character data to smallint in db2 rikdeb DB2 5 Thu Jul 14, 2016 12:38 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us