View previous topic :: View next topic
|
Author |
Message |
kanish
New User
Joined: 02 Jan 2006 Posts: 10
|
|
|
|
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 |
|
|
thanooz
New User
Joined: 28 Jun 2005 Posts: 99
|
|
|
|
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 |
|
|
kanish
New User
Joined: 02 Jan 2006 Posts: 10
|
|
|
|
I am not using program ...I m using JCL |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
|