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

Editing a sequential dataset


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
the_gautam

Active User


Joined: 05 Jun 2005
Posts: 165
Location: Bangalore

PostPosted: Thu Jan 24, 2008 10:42 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Jan 24, 2008 11:23 pm
Reply with quote

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
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Fri Jan 25, 2008 7:52 am
Reply with quote

gautam,

If your requirement is to shift the field positions (as shown), use sorts (both df/sync)
Code:
INREC FIELDS=.....
OR
Code:
OUTREC FIELDS=.....
.

Search forum for examples.
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
Search our Forums:

Back to Top