Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to specify outfile format

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

New User


Joined: 02 Jan 2006
Posts: 10

PostPosted: Tue Mar 21, 2006 1:53 pm    Post subject: How to specify outfile format
Reply with quote

Hi all,

Please help me regd, this

Output file format
01 WS-MARS-TITLE-REC.
05 WS-MARS-TITLE-KEY.
10 WS-MARS-LINE-NBR PIC X(09).

05 WS-MARS-LINE-DESC-S PIC X(30).
05 WS-MARS-LINE-DESC-L PIC X(200).
05 WS-MARS-ACCT-TYPE PIC X(01).
05 FILLER PIC X(60).
Input file fmt:
01 ws-input-rec
05 WS-MARS-LINE-NBR PIC X(09).
05 WS-MARS-LINE-DESC-L PIC X(200).

I want to copy 9 char field to 9 char field and 200 char to 200 char field frm Inout to output file rest fields of Output file shud be spaces
Using outrec or inrec in JCL sort ......do u know this
? if yes please write code?
Back to top
View user's profile Send private message

thanooz

New User


Joined: 28 Jun 2005
Posts: 99

PostPosted: Tue Mar 21, 2006 2:12 pm    Post subject:
Reply with quote

hi kanish,


you can move directly using the variable names


move WS-MARS-TITLE-KEY of ws-input-rec to WS-MARS-TITLE-KEY of WS-MARS-TITLE-REC.

move WS-MARS-TITLE-REC of ws-input-rec to WS-MARS-TITLE-REC of WS-MARS-TITLE-REC.

or u can use move corresponding also.
Back to top
View user's profile Send private message
kanish

New User


Joined: 02 Jan 2006
Posts: 10

PostPosted: Tue Mar 21, 2006 2:47 pm    Post subject: Re: How to specify outfile format
Reply with quote

I am not using program ...I m using JCL
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Mar 21, 2006 9:25 pm    Post subject:
Reply with quote

Quote:
I want to copy 9 char field to 9 char field and 200 char to 200 char field frm Inout to output file rest fields of Output file shud be spaces
Using outrec or inrec in JCL sort ......do u know this


Well, I know sort, but I don't know much COBOL, so I'm not sure I understand what you want to do.

I think you want to go from input records that look like this:

Code:

|field1|field2|
   9     200


to output records that look like this:

Code:

|field1|blanks|field2|blank|blanks|
   9      30    200     1     60


If so, then you can use these DFSORT statements:

Code:

  OPTION COPY
  OUTREC FIELDS=(1,9,30X,10,200,61X)


If that's not what you want to do, then you need to be more clear about what it is you want to do.
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 Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts How to pick only YYMMDD from DATE1P (... atulbaviskar SYNCSORT 7 Wed Mar 22, 2017 11:39 am
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us