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: 7315

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 values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts XMITIP sends it out. Can it copy on l... Rommel Dayon Rustia IBM Tools 0 Tue Sep 05, 2017 10:16 am
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm

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