IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Copy the variable with comp-3 using DFSORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
tvinodkumar7

New User


Joined: 06 Jan 2015
Posts: 19
Location: Hyderabad, INDIA

PostPosted: Wed Jan 07, 2015 11:39 am
Reply with quote

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...
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jan 07, 2015 1:14 pm
Reply with quote

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.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts VB to VB copy - Full length reached SYNCSORT 8
Search our Forums:

Back to Top