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

Ispf command to shift unblocked records.


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
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
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: 1020
Location: India

PostPosted: Thu Jan 28, 2010 4:45 pm
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
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

Global Moderator


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

PostPosted: Thu Jan 28, 2010 8:06 pm
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: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Jan 28, 2010 8:16 pm
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
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: 400
Location: Mumbai

PostPosted: Thu Jan 28, 2010 10:06 pm
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

Global Moderator


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

PostPosted: Fri Jan 29, 2010 1:52 am
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: 1702
Location: Australia

PostPosted: Fri Jan 29, 2010 3:50 am
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

Moderator Emeritus


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

PostPosted: Fri Jan 29, 2010 3:56 am
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
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: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri Jan 29, 2010 2:22 pm
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
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: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri Jan 29, 2010 2:30 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jan 29, 2010 4:26 pm
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: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri Jan 29, 2010 5:29 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jan 29, 2010 5:36 pm
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: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri Jan 29, 2010 5:41 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jan 29, 2010 5:43 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Looking for a little history of ISPF ... TSO/ISPF 5
Search our Forums:

Back to Top