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

How to specify outfile format


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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
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 Developer


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

PostPosted: Tue Mar 21, 2006 9:25 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts InfoSphere OPTIM CSV ouput vs DSNTIUA... IBM Tools 3
No new posts Need mmmyy date format SYNCSORT 6
Search our Forums:

Back to Top