tvinodkumar7
New User
Joined: 06 Jan 2015 Posts: 19 Location: Hyderabad, INDIA
|
|
|
|
I need to copy the variable with comp-3 to the output file using DFSORT outrec
Input file :
05 Tansaction-amount PIC S9(11)V99 COMP-3.
In the below logic, I am copying the record with 15 characters GT spaces to 203 location of output file
Also I need to include the transaction amount to the below BUILD
IFTHEN=(WHEN=(203,15,CH,GT,C' '),
BUILD=(1:C'000',4:203,15))
Please suggest.
TIA... |
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
You are in the DFSORT forum, so please be a bit more creative with your topic title.
Why do you have to use OUTRECT?
You'll find your BUILD is easier to understand without the column numbers.
A packed-decimal field is just a field, and there is no problem just coding in a similar way:
| Code: |
IFTHEN=(WHEN=(203,15,CH,GT,C' '),
BUILD=(C'000',203,15,start,length)) |
Where start is the start of your field, and length is the length of it. |
|