View previous topic :: View next topic
|
Author |
Message |
the_gautam
Active User
Joined: 05 Jun 2005 Posts: 165 Location: Bangalore
|
|
|
|
Hi everyone,
i ve got a problem in my work, can anyone help me out in it?
I ve got a PS dataset with 15 bytes of record length.
01 in-rec.
05 in-name x(10).
05 in-id 9(5).
Now i require it to change as :
01 out-rec.
05 out-id 9(5).
05 out-name x(10).
how can i achieve it using TSO/ISPF? as i am not supposed to use COBOL program over this file. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I'm sure everyone will have their own unique solution.
I did mine by:
1. Labeling the first record as .A, the last as .B.
2. Using CUT .A .B to create a temporary copy of the data.
3. Shifting all of the lines left 10 characters. This moves the numeric values into the first 5 positions.
4. Using PASTE AFTER .B to paste the copy after the last record.
5. Labeling the first pasted record as .C, the last as .D.
6. Shifting the pasted records right 5 characters.
7. Overlaying the pasted records .C to .D over .A to .B. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
gautam,
If your requirement is to shift the field positions (as shown), use sorts (both df/sync)
OR
Code: |
OUTREC FIELDS=..... |
.
Search forum for examples. |
|
Back to top |
|
|
|