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
 

 

Need help to Change character to Packed decimal

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

New User


Joined: 23 Oct 2006
Posts: 24
Location: India

PostPosted: Tue Sep 15, 2009 5:01 pm    Post subject: Need help to Change character to Packed decimal
Reply with quote

Hi All,

Would be really thankful if any one gives me an idea to solve the issue. We are getting the file in Character format. The file is VB and Record length 256. The output file should be of variable format with same record length.

If 55 postion is 912 – it is header , 913 – detail and 914 remarks.

Code:
----+----6----+----7----+----8----+----9----+----0----+----1---
912AOH8000271HONIX80UD NWHONIX09245C00000C09246C Y09245C
91301MPC8343ZQAGDB 0789ZMQ83864 15-10277-02

For example : For 912 in postion 83 – 5 characters value should be changed to packed decimal (S9(5) COMP-3)
For 913 also I need to change with different position.

Could you please suggest me the sort card to perform this action.

Thanks in advance for your reply.
Back to top
View user's profile Send private message

Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Tue Sep 15, 2009 9:33 pm    Post subject:
Reply with quote

Please use BBCode (see FAQ).
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Sep 15, 2009 9:42 pm    Post subject:
Reply with quote

jegan_selvan,

Use the following control cards. since you said your indicator starts at pos 55 and your input is a VB file, You need to account for the 4 byte RDW , so the actual position of the indicator is 59. Assuming that the following control cards will give you the desired results. It will convert the 5 bytes at pos 87 (83+4 rdw) to packed decimal format of 3 bytes as s9(5) comp3 is only 3 bytes and 2 spaces and for 913 type I chose randomly pos 94 (90+4 rdw)


Code:

//SYSIN    DD *                           
  SORT FIELDS=COPY                         
  INREC IFTHEN=(WHEN=(59,3,CH,EQ,C'912'),   
  OVERLAY=(87:87,5,ZD,PD,LENGTH=3,2x)),       
  IFTHEN=(WHEN=(59,3,CH,EQ,C'913'),         
  OVERLAY=(94:94,5,ZD,PD,LENGTH=3,2x))       
/*
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 the use of 'B3'x character in a panel Pedro TSO/ISPF 1 Thu Feb 16, 2017 3:09 am
No new posts Joinkeys with decimal scdinesh DFSORT/ICETOOL 3 Fri Feb 10, 2017 4:46 am
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am


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