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 macro: problem in defining line variable

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

New User


Joined: 24 Jun 2008
Posts: 59
Location: chennai

PostPosted: Thu Mar 12, 2009 5:50 pm    Post subject: ISPF macro: problem in defining line variable
Reply with quote

hi ,
i have written a ispf macro. that macro is for copying specific set of lines from a dataset and to store those lines in some variables. so that i can write these variables to another result dataset.

the problem here is, for the following loop,
COUNT=1
DO RLINE = FIRST TO LAST BY 1
"ISREDIT (JP."COUNT") = LINE "RLINE
COUNT=COUNT+1
END
FIRST and LAST are the line numbers.....
i could not define the variable is jp.count because it is saying... the syntax is wrong ...... how can i define a variable to get all the lines of that dataset into the variables.
Back to top
View user's profile Send private message

maridawson

New User


Joined: 24 Jun 2008
Posts: 59
Location: chennai

PostPosted: Thu Mar 12, 2009 5:52 pm    Post subject:
Reply with quote

i have also tried like without '.' ........ like jp"count" ...... but i couldnt get the values back .... since i cannot form a loop for getting the values of
jp1
jp2
jp3
jp4

since if i give jpcount ...... it will be considered as a single variable.....
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1226
Location: Israel

PostPosted: Thu Mar 12, 2009 6:46 pm    Post subject:
Reply with quote

Do it the easy way:
Code:
COUNT=1
DO RLINE = FIRST TO LAST BY 1
   "ISREDIT (LI) = LINE "RLINE
   JP.COUNT = LI
   COUNT=COUNT+1
END
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Thu Mar 12, 2009 9:27 pm    Post subject: Reply to: ISPF macro: problem in defining line variable
Reply with quote

I prefer starting with zero, otherwise the count is one too many.

Code:
COUNT=0
DO RLINE = FIRST TO LAST BY 1
   "ISREDIT (LI) = LINE "RLINE
   COUNT=COUNT+1
   JP.COUNT = LI
END
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Thu Mar 12, 2009 9:29 pm    Post subject: Reply to: ISPF macro: problem in defining line variable
Reply with quote

You might also try using the CUT macro statement followed later by a macro that uses PASTE.
Back to top
View user's profile Send private message
maridawson

New User


Joined: 24 Jun 2008
Posts: 59
Location: chennai

PostPosted: Fri Mar 13, 2009 10:25 am    Post subject:
Reply with quote

thanks marso and pedro...... i got it ..... that was very simple .... how come i didnt get that idea ....... icon_redface.gif
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 Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Customizing the ISPF HILITE Command Pedro TSO/ISPF 3 Fri Mar 03, 2017 11:49 pm


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