Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
ISREDIT - Blank out the unused symbolic variables from PROC
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
Author Message
chidams78
Currently Banned

Active User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Fri Aug 29, 2008 9:24 pm    Post subject: ISREDIT - Blank out the unused symbolic variables from PROC
Reply with quote

Hi all,

By means of ISREDIT macro, I am puting ' // ' before the proc step that we don't want to execute, which is not needed for testing purpose.

In the below example,we don't want to execute the step containing PGM=DPD111, so we will be puting // before that PROC STEP2 by means of ISREDIT macro. The concern here is, some of the PROC symbolic variables i.e., CONDB and GDG are used exclusively for STEP2 which we are not executing. So when we JEM or JSCAN the job, we will be getting the error as " Symbolic variables declared but not used in the PROC". So how we can get to know and delete the symbolic variables which are not used.

Example PROC
------------
//TST1101 PROC CONDA='0,NE',CONDB='0,NE',GDG='(+1)'

//STEP1 EXEC PGM=SORT,COND=(&CONDA)
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=TST#TT.TEST.FILE,DISP=SHR
//SORTOUT DD DSN=TST#TT.TEST.FILE.SORTED,
// DISP=(,CATLG,DELETE)
// SPACE=(TRK,(1,1),RLSE),
// DCB=(RECFM=FB,LRECL=160,BLKSIZE=0)
//SYSIN DD DSN=TTT.CHIDU.CTLLIB(CHIDUCTL),DISP=SHR
//*
//
//STEP2 EXEC PGM=DPD111,COND=(&CONDB)
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//MPIN DD DSN=TST#TT.TEST.FILE.SORTED,DISP=SHR
//MPOUT DD DSN=TST#TT.TEST.AUGFILE(&GDG),
// DISP=(,CATLG,DELETE),UNIT=DISK,
// SPACE=(TRK,(2,1),RLSE),
// DCB=(RECFM=FB,LRECL=100,BLKSIZE=0)
//SYSOUT DD SYSOUT=*

The logic that comes to my mind is
Once after puting the // before the STEP2, read each line from STEP2 downwards and get the symbolic variables in a ISREDIT variable. Check that symbolic variable from the top of the PROC till STEP2 and if the occurance is zero, then blank out that symbolic variable.

Could you please help me in finding out the unused symbolic variables with some other good idea.

Rgds
Chidams
Back to top
View user's profile Send private message
References
chidams78
Currently Banned

Active User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Fri Aug 29, 2008 10:34 pm    Post subject:
Reply with quote

Hi,

I had put JSCAN on the following JCLand for this error for the unused symbolic variables


==MSG> .JAAA 8 DSS2190E - PROC SYMBOLIC
VARIABLE "CONDB " NOT USED IN PROC

==MSG> .JAAA 8 DSS2190E - PROC SYMBOLIC VARIABLE "GDG "
NOT USED IN PROC

Rgds
Chidam
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 543
Location: work

PostPosted: Fri Aug 29, 2008 11:47 pm    Post subject: Reply to: ISREDIT - Blank out the unused symbolic variables
Reply with quote

If you are testing, perhaps it is easier to make a new member.

And in the new member, you can delete the unused parms from the PROC statement.
Back to top
View user's profile Send private message
chidams78
Currently Banned

Active User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Sat Aug 30, 2008 12:00 am    Post subject:
Reply with quote

The concern here is how can we find the unused symbolic variables in the PROC. Itz not that the symbolic variable is totally unused but the fact that we had put // till the step that we want to execute, which inturn forces us to delete the declared symbolic variable exclusively used after // statement.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 543
Location: work

PostPosted: Sat Aug 30, 2008 4:39 am    Post subject: Reply to: ISREDIT - Blank out the unused symbolic variables
Reply with quote

Quote:
how can we find the unused symbolic variables in the PROC

Not sure I understand your concern. It seems clear that you got messages that told you which variables to remove. Just remove them now.
Code:
==MSG> .JAAA 8 DSS2190E - PROC SYMBOLIC
VARIABLE "CONDB " NOT USED IN PROC

==MSG> .JAAA 8 DSS2190E - PROC SYMBOLIC VARIABLE "GDG "
NOT USED IN PROC
Back to top
View user's profile Send private message
chidams78
Currently Banned

Active User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Sat Aug 30, 2008 6:10 am    Post subject:
Reply with quote

Hi Pedro,

Ya..my concern is through ISPF macro, how can we find the unused symbolic variables in the PROC

Thanks
Chidam
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 543
Location: work

PostPosted: Sat Aug 30, 2008 11:06 pm    Post subject: Reply to: ISREDIT - Blank out the unused symbolic variables
Reply with quote

1. find " PROC " then get the line and parse out the parms into a stem variable, perhaps 'a_parm.x'

2. Find '// ' in column 1. put a label at that line, perhaps call it .end

3. loop through your stem, and issue "FIND '"a_parm.x"' .zfirst .end"

4. If you find it, good! if not found, remove from the PROC statement.
Back to top
View user's profile Send private message
chidams78
Currently Banned

Active User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Wed Sep 03, 2008 9:27 pm    Post subject:
Reply with quote

Thanks Pedro
I had put the code to validate as you told but not able to get the symbolic variables in stem concept

//INS2204 PROC CONDA='0,NE', COND6='0,NE',CONDB='0,NE',CONDC='0,NE',
// COND4='7,LT',CONDQ='7,LT',CONDS='7,LT'

Code
-------
Code:
"ISREDIT CURSOR = 1 1"                                     
"ISREDIT (LINE) = LINENUM .ZCSR"                           
"ISREDIT LABEL .ZCSR = .A 0"                               
"ISREDIT F '//                                           '"
"ISREDIT (LINE) = LINENUM .ZCSR"                           
"ISREDIT LABEL (LINE) = .B 0"                             
"ISREDIT CURSOR = 1 1"                                     
"ISREDIT (LINE) = LINENUM .ZCSR"                           
"ISREDIT FIND .A .B 'CONDQ' ALL"     [color=blue] /* Here need to get the variable dynamically                     [/color]"ISREDIT (FINDS) = FIND_COUNTS"                           
IF FINDS > 1
    <do nothing>
ELSE
    <delete the symbolic variable from the declaration in the PROC


Plz help
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 543
Location: work

PostPosted: Wed Sep 03, 2008 10:07 pm    Post subject: Reply to: ISREDIT - Blank out the unused symbolic variables
Reply with quote

Something like this (untested):

The example saves the proc variable names to a rexx stem variable called a_parm
Code:

x = 0
a_parm. = ''
"(aline) = LINE .zcsr"
parse var aline . 'PROC ' theparms
theparms = strip(theparms)
Do while (theparms /= '')  /*while more parms */
   parse var theparms  parm "=' . "'," theparms
   if parm /= '' THen
     Do /* found parm */
       x =  x+1
       a_parm.x = parm
     End /* found parm */
End   /* while more parms*/
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 543
Location: work

PostPosted: Wed Sep 03, 2008 10:11 pm    Post subject: Reply to: ISREDIT - Blank out the unused symbolic variables
Reply with quote

sorry my last post was intended for a different thread, but cannot see that thread at the moment????
Back to top
View user's profile Send private message
chidams78
Currently Banned

Active User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Wed Sep 03, 2008 10:43 pm    Post subject:
Reply with quote

Hi Pedro,

No probs..
You mean to say that the above code snippet that you had provided is not for this thread..
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 543
Location: work

PostPosted: Thu Sep 04, 2008 1:07 am    Post subject: Reply to: ISREDIT - Blank out the unused symbolic variables
Reply with quote

I think my browser was messed up after my first post today, so I only thought it was the wrong thread. It is the correct thread.
Back to top
View user's profile Send private message
chidams78
Currently Banned

Active User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Fri Sep 05, 2008 1:10 am    Post subject:
Reply with quote

Hi Pedro,

Instead of reading each declared symbolic parameter from the PROC, and checking it out whether it is used in the PROC by puting the label range, will it be good if we follow the belwo approach

1. Put a label at the beginning of the line .START
1. Find if '// ' is there. Put a label for that .MID
2. Put a label at the end of the line .END
3. Read the first line from .MID and get the symbolic variable into a REXX variable and search it between .START and .MID.
4. If the occurance is 1, then blank out that symbolic variable else leave it as such.

By this way we don't have to check for all the symbolic variables.
Whether this approach holds good.
For the step3 that I had mentioned, I am not able to get the symbolic variable into a REXX variable. Symbolic variables can either come in between & and ) or & and .

Any idea how to retrive those into REXX variable
Back to top
View user's profile Send private message
chidams78
Currently Banned

Active User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Fri Sep 05, 2008 1:55 am    Post subject:
Reply with quote

The approach that I had told in my last post will not work out because we will be getting only the symbolic variable name and won't be getting the value of that. For blanking out purpose, we need to blank out both symbolic variable and its value, right.

So I think the above approach specified by me won't work out.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 543
Location: work

PostPosted: Fri Sep 05, 2008 5:00 am    Post subject: Reply to: ISREDIT - Blank out the unused symbolic variables
Reply with quote

See my earlier post from: Sat Aug 30, 2008 10:36 pm
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 HoursGoto page 1, 2  Next
Page 1 of 2