Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Copy the variable with comp-3 using DFSORT

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

New User


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

PostPosted: Wed Jan 07, 2015 11:39 am    Post subject: Copy the variable with comp-3 using DFSORT
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Wed Jan 07, 2015 1:14 pm    Post subject: Reply to: DFSORT
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    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 Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts Formatting using DFsort Guru Nandu DFSORT/ICETOOL 5 Thu Nov 30, 2017 7:33 am
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 3 Fri Nov 17, 2017 9:49 am
No new posts Split files upto certain limit based ... bubbu75 DFSORT/ICETOOL 5 Tue Nov 14, 2017 11:11 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us