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
 

 

ISREDIT - Handling truncation issues

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

New User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Wed Sep 03, 2008 8:26 pm    Post subject: ISREDIT - Handling truncation issues
Reply with quote

Hi all,

My reqt is to change the production naming qualifiers to test naming qualifiers. Eg: "PRD" to "TST.R2.TEST" in the PROC.

The problem here is that when doing this conversion, the truncation occurs (mainly to symbolic parameters declared in the PROC) and I had solved it by the following logic.

1. Split the line to 3 parts. The first part will have 33 bytes.
2. From the 34th byte, see whether " ,' " is there. Then till that line, put it in part2 and remaining in part3.
3. Delete the part3 from the main line and write it in new line immediately after the main line puting //.
4. After this , do the conversion from PRD to TST.R2.TEST

But the above logic works for the PROC of Case 1 shown below.
But in some other PROCs, the "PRD" keyword comes as shown in Case-2 and since it comes as part of comment, how to handle that
We can't exclude that line as it is not fully commented
("INPUT GDG - PRD.INS.OSTMONTH.EXPAND"). The same in Case-3 wherein if we are converting PRD, the wordings "(KEEP DIFF THAN MSG" will truncate showing Error when we put JSCAN in the JCL.

Case-1
-------
//TST1111 PROC QSL='(0)',TBLDI='(0)',SUBCTL='64242T',HLQUA='PRD',
// PDLOSS='(+1)',OSLOSS='(+1)',DATEFILE='(-10)',

Case-2
------
//TGT1000 PROC ASVI1='PRD.',
// BDVI2='PRD.',
// OSTI='(0)', INPUT GDG - PRD.INS.OSTMONTH.EXPAND
// OCMI='(0)', INPUT GDG - PRD.INS.OCMMONTH.EXPAND
// QSL1='(+1)', OUTPUT GDG - PRD.STA.QSL
// STATMST='(0)' INPUT GDG - PRD.INS.STATMSTR
//TST8000A EXEC PGM=ICETOOL,PARM=EQUALS,
// ACCT='SORT TTL AND OSTMONTH'


Case-3
------
//TST1110A EXEC PGM=TSTABC,
// ACCT=('CREATE CSP RECORDS')
//SYSOUT DD SYSOUT=(P,,0010),HLQUA='PRD' (KEEP DIFF THAN MSG
//* SO AMOUNTS / COUNTS DO NOT GET IN JCL)
//SYSABEND DD SYSOUT=*


Code put forth for handling Case-1
-----------------------------------
Code:
SLASHES = '//             '       
CALL CHNG_PROC('PRD')
"ISREDIT C 'PRD' 'TST.R2.TEST' ALL"

CHNG_PROC:   
PARSE ARG TEXT1                                       
SAVERC = 0                                             
"ISREDIT CURSOR = 1 1"                                 
DO WHILE (SAVERC = 0)                                 
   "ISREDIT F &TEXT1 NX"                               
   SAVERC = RC                                         
   IF SAVERC = 0 THEN                                 
      DO                                               
        "ISREDIT (LINE) = LINENUM .ZCSR"               
        "ISREDIT (LNE1) = LINE .ZCSR"                 
         PARSE VAR LNE1 PART1 33 PART2 "'," PART3    /*dividing main line to 3 parts
         IF SUBSTR(PART3,1,2) <> ' ' THEN             /*check part3 has data
            DO                                         
              PART3 = SLASHES||PART3                    /*combine slashes to part3
              PART = PART1||PART2||"',"                   
             "ISREDIT LINE &LINE = (PART)"             
             "ISREDIT LINE_AFTER &LINE = (PART3)"     
            END                                       
         ELSE DO                                       
               "ISREDIT (LINE) = LINENUM .ZCSR"   
              END                                   
      END                                           
   ELSE DO                                           
          "ISREDIT (LINE) = LINENUM .ZCSR"           
        END                                           
END


Plz help me how to handle Case-2 and Case-3 as shown above.

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

Pedro

Senior Member


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

PostPosted: Thu Sep 04, 2008 1:20 am    Post subject: Reply to: ISREDIT - Handling truncation issues
Reply with quote

I do not have a good answer for comments. I do not mind comments at the end of a line, but they have make sense and still fit. I suggest either of these approaches:

1. split the line, but put the entire comment ahead of the line that the comment is directed at.
Code:
Case-2
------
//TGT1000 PROC ASVI1='PRD.',
// BDVI2='PRD.',
//* OSTI:  INPUT GDG - &ASVI1.INS.OSTMONTH.EXPAND
// OSTI='(0)',
//* OSMI: INPUT GDG - &ASVI1.INS.OCMMONTH.EXPAND
// OCMI='(0)',
//* QSL1:  OUTPUT GDG - &ASVI1.STA.QSL
// QSL1='(+1)',
//* STATMST:  INPUT GDG - &ASVI1.INS.STATMSTR
// STATMST='(0)'
//*
//TST8000A EXEC PGM=ICETOOL,PARM=EQUALS,
// ACCT='SORT TTL AND OSTMONTH'



2. Put all comments ahead of the proc call.
Code:
Case-2
------
//* -------------------------------------
//*  parms used:
//*    OSTI   : INPUT GDG - &ASVI1.INS.OSTMONTH.EXPAND
//*    OSMI   : INPUT GDG - &ASVI1.INS.OCMMONTH.EXPAND
//*    QSL1   : OUTPUT GDG - &ASVI1.STA.QSL
//*    STATMST: INPUT GDG - &ASVI1.INS.STATMSTR
//TGT1000 PROC ASVI1='PRD.',
// BDVI2='PRD.',
// OSTI='(0)',
// OCMI='(0)',
// QSL1='(+1)',
// STATMST='(0)'
//*
//TST8000A EXEC PGM=ICETOOL,PARM=EQUALS,
// ACCT='SORT TTL AND OSTMONTH'


Also, I disgree with using fixed values in the comments, when it is actually a variable value used when the proc is used.
Back to top
View user's profile Send private message
chidams78
Currently Banned

New User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Thu Sep 04, 2008 9:36 pm    Post subject:
Reply with quote

I also thought of the first option that you had said.
But i am wondering how we can handle this in ISPF edit macros
since the ISREDIT code that i had mentioned is already handling case-1 scenario but had no clue about case-2 and case-3 scenarios.

The manual thing that we can do is pushing those comments to next line like that you had mentioned. Can u plz help me how we can handle that in ISPF macros
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Thu Sep 04, 2008 9:57 pm    Post subject: Reply to: ISREDIT - Handling truncation issues
Reply with quote

Quote:
pushing those comments to next line like that you had mentioned

No, I recommended putting the comment in the line before it, NOT the next.

My recommendation is not to make your original code do three things, but to write new code to do the other things.

You did not comment on my suggestion:
Quote:
Also, I disgree with using fixed values in the comments, when it is actually a variable value used when the proc is used.

You may not have to handle case 2 or case 3.
Back to top
View user's profile Send private message
chidams78
Currently Banned

New User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Thu Sep 04, 2008 10:12 pm    Post subject:
Reply with quote

Thanks Pedro for the suggestion
Sorry..I meant puting comments before the line only.it was a typo error.
As for your suggestion of using fixed comments, actually this prod PROC is written years before and at that time nobody cared about that.

But the actual reqt for me is to convert PRD to TST.R2.TEST in this PROC.
In this scenario, unfortunately the PRD comes as part of comment. If it came as //* PRD, I could have excluded the line and then proceeded for naming standard conversion. But since this is an exceptional case, I am wondering how we can handle it using macros.
Back to top
View user's profile Send private message
Adrian Stern

New User


Joined: 13 Feb 2008
Posts: 12
Location: Sweden

PostPosted: Mon Sep 08, 2008 5:21 pm    Post subject:
Reply with quote

Use variables!

// set env =tst
OR
// set env= prd

THEN

//TGT1000 PROC ASVI1='PRD.',
// BDVI2='PRD.',
// OSTI='(0)', INPUT GDG - env..INS.OSTMONTH.EXPAND
Back to top
View user's profile Send private message
chidams78
Currently Banned

New User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Fri Sep 12, 2008 8:33 pm    Post subject:
Reply with quote

Adrian,

Here I need to change the PRD to TST.R2.TT only if it is not commented.

In my example, the ISPF macro will go ahead and change all the PRD to TST.R2.TT but since this is as part of comment but not written within //* I am not able to exclude this.

// OSTI='(0)', INPUT GDG - PRD.INS.OSTMONTH.EXPAND
// OCMI='(0)', INPUT GDG - PRD.INS.OCMMONTH.EXPAND

How to go ahead with this
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 ODPP(Optim Data privacy Provider) Iss... Rama kishore IBM Tools 1 Mon Nov 07, 2016 5:46 pm
No new posts FTP from windows server into Mainfram... sathyajes All Other Mainframe Topics 24 Wed Jul 20, 2016 1:33 pm
No new posts Faccing issues while creating a GDG V... sravindra_s JCL & VSAM 5 Thu Jun 23, 2016 11:26 am
No new posts ON ERROR handling soundarr PL/I & Assembler 2 Wed May 11, 2016 3:37 am
No new posts Exception Handling in Native Stored P... Mariraj DB2 1 Thu Feb 25, 2016 4:08 am


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