jegan_selvan
New User
Joined: 23 Oct 2006 Posts: 24 Location: India
|
|
|
|
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. |
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
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))
/* |
|
|