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
 
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 Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts FTP data transfer from PC to Mainfram... AJAYREDDY All Other Mainframe Topics 8 Wed Aug 23, 2017 9:59 pm
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am

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