Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Ispf command to shift unblocked records.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
milind suman
Warnings : 1

New User


Joined: 19 Aug 2009
Posts: 55
Location: Pune

PostPosted: Thu Jan 28, 2010 3:45 pm    Post subject: Ispf command to shift unblocked records.
Reply with quote

Hi ,

Is there any shortcut/tip for ISPF command which can help me to acheive this . The number of records are more than 50 .

My data set looks like this :





Code:

004300           WHEN SP-RTN-NUM='0005'  AND SP-LIMIT-TYP='0019'
004400           WHEN SP-RTN-NUM='0005'  AND SP-LIMIT-TYP='0054'
004500           WHEN SP-RTN-NUM='0005'  AND SP-LIMIT-TYP='0021'
004600           WHEN SP-RTN-NUM='0005'  AND SP-LIMIT-TYP='FFFF'
005900                PERFORM   FS2BUILD  THRU  FS2BUILD-EXIT   
006000                PERFORM   UC1BUILD  THRU  UC1BUILD-EXIT   
006100                PERFORM   PCOBUILD  THRU  PCOBUILD-EXIT   
006200                PERFORM   HIABUILD  THRU  HIABUILD-EXIT   


I have to arrange these lines as :
Code:
004100           WHEN SP-RTN-NUM='0005'  AND SP-LIMIT-TYP='004A'     
004110                PERFORM   FS2BUILD  THRU  FS2BUILD-EXIT       
004200           WHEN SP-RTN-NUM='0005'  AND SP-LIMIT-TYP='00BA'     
004210                PERFORM   UC1BUILD  THRU  UC1BUILD-EXIT       
004300           WHEN SP-RTN-NUM='0005'  AND SP-LIMIT-TYP='0019'     
004310                PERFORM   PCOBUILD  THRU  PCOBUILD-EXIT       
004400           WHEN SP-RTN-NUM='0005'  AND SP-LIMIT-TYP='0054'     
004410                PERFORM   HIABUILD  THRU  HIABUILD-EXIT       
004500           WHEN SP-RTN-NUM='0005'  AND SP-LIMIT-TYP='0021'     
004510                PERFORM   ARLBUILD  THRU  ARLBUILD-EXIT       
Back to top
View user's profile Send private message

sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Thu Jan 28, 2010 4:45 pm    Post subject:
Reply with quote

Milind,

You can use Edit Commands like (M)ove & (A)fter.

Sushanth
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Thu Jan 28, 2010 7:42 pm    Post subject:
Reply with quote

You could put number pairs in unused columns of matching lines, then exclude the block of lines and SORT s-col e-col X to resequence them.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Thu Jan 28, 2010 8:06 pm    Post subject: Reply to: Ispf command to shift unblocked records.
Reply with quote

Quote:
You could put number pairs in unused columns of matching lines, then exclude the block of lines and SORT s-col e-col X to resequence them.

What a wonderful idea.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Thu Jan 28, 2010 8:16 pm    Post subject:
Reply with quote

How did you generate your input?
Back to top
View user's profile Send private message
milind suman
Warnings : 1

New User


Joined: 19 Aug 2009
Posts: 55
Location: Pune

PostPosted: Thu Jan 28, 2010 9:18 pm    Post subject: Reply to: Ispf command to shift unblocked records.
Reply with quote

Hi Bill ,
Thanks for this idea ..indeed helped me to arrange the records quickly ..however i had to put the even-odd numbers manualy for the matching records . before sorting . Wondering if this effort could be minimized as well .
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 401
Location: Mumbai

PostPosted: Thu Jan 28, 2010 10:06 pm    Post subject:
Reply with quote

maybe: renum, num off, sort trick on 73-80 (or whatever cols), renum, unnum
assuming you don't want to preserve line numbers and there is room for them (not tested - nice trick, Bill)
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Fri Jan 29, 2010 1:52 am    Post subject: Reply to: Ispf command to shift unblocked records.
Reply with quote

Quote:
Wondering if this effort could be minimized as well


I think you could write an edit macro that did all of that, but it would not minimize your work. That is, following Bill's suggestion probably took about 2 minutes... writing a macro might take an hour or so, depending on your skill.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Jan 29, 2010 3:50 am    Post subject:
Reply with quote

Hi,

if you have to manually number pair them off, why not just
Quote:
You can use Edit Commands like (M)ove & (A)fter.

as suggested by Sushanth.


Gerry
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jan 29, 2010 3:56 am    Post subject:
Reply with quote

Hello,

Quote:
How did you generate your input?
Still unanswered. . . icon_rolleyes.gif
Back to top
View user's profile Send private message
milind suman
Warnings : 1

New User


Joined: 19 Aug 2009
Posts: 55
Location: Pune

PostPosted: Fri Jan 29, 2010 2:17 pm    Post subject:
Reply with quote

gcicchet,

The number pairs can be easily generated by Excel and then pasting to DS . M..A for 50 records was tiring ...

D.ch ,

while writing the new pgm I had to copy the info from other data set wherein it was decl;ared as Data storage in 1 row for each When - Perform clause .
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Fri Jan 29, 2010 2:22 pm    Post subject:
Reply with quote

So why not process the 1 line data to get what you want ?
Back to top
View user's profile Send private message
milind suman
Warnings : 1

New User


Joined: 19 Aug 2009
Posts: 55
Location: Pune

PostPosted: Fri Jan 29, 2010 2:27 pm    Post subject:
Reply with quote

Ok Peter,

A(0001),A(0234),A(LABEL1)
A(0002),A(0224),A(LABEL2)
A(0021),A(0434),A(LABEL3)
A(0031),A(0234),A(LABEL4)
..
.
.
100 TIMES..

can u suggest faster way of writing the whole thing as :

when var1 = 0001 and var2= 0234
perform label1
when var1= 0002 and var2 =0224
perform label2
..
..

and so on
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Fri Jan 29, 2010 2:30 pm    Post subject:
Reply with quote

Rexx, Easytrev, SAS are some utilities to do the job for you, instead of
manually shifting, renumbering, editing etc.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri Jan 29, 2010 4:26 pm    Post subject: Reply to: Ispf command to shift unblocked records.
Reply with quote

what about using a simple ISPF change commmand

Code:
123456789012345678901234567890
A(0001),A(0234),A(LABEL1)
A(0002),A(0224),A(LABEL2)
A(0021),A(0434),A(LABEL3)
A(0031),A(0234),A(LABEL4)


c "),A(" " perform " all 15
c "),A(" " and var2 = " all 7
c "A(" "when var1 = " all 1
c ")" "" all
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Fri Jan 29, 2010 5:29 pm    Post subject:
Reply with quote

With all respect Enrico, but that will change one line. The TS likes to have it in 2 lines, at least thats what i understood.

So in rexx you could do it like :

get input
do 1 parse input line to get the variables and pre/suffix them with
some coding
write the created values to some output
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri Jan 29, 2010 5:36 pm    Post subject: Reply to: Ispf command to shift unblocked records.
Reply with quote

You are right Peter, but I tougth that the two line were just cosmetics...
unless COBOL cares!
as I said many times I do not speak funny languages icon_biggrin.gif
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Fri Jan 29, 2010 5:41 pm    Post subject: Re: Reply to: Ispf command to shift unblocked records.
Reply with quote

enrico-sorichetti wrote:
as I said many times I do not speak funny languages icon_biggrin.gif


How about Italian icon_mad.gif

Oops, and Dutch of course belongs to that. icon_evil.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri Jan 29, 2010 5:43 pm    Post subject: Reply to: Ispf command to shift unblocked records.
Reply with quote

Quote:
Oops, and Dutch of course belongs to that.

You beat me to it!
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 -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us