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 - Deleting the data between the lines 73 and 80

 
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: Fri Sep 12, 2008 2:47 am    Post subject: ISREDIT - Deleting the data between the lines 73 and 80
Reply with quote

Hi all,

Through ISPF edit macro, could you please help me how to delete the data (if it is there), between the columns 73 and 80.

My reqt is to convert FCB=STD to FCB=STD,HOLD=YES in the below PROC, which forces the comments after that to go to col 73 to 80. So when I put JEM, it shows continuation not received error.

//TST8110A EXEC PGM=B808,PARM='&SUBCTL',
// ACCT=('CREATE CSP RECORDS')
//SYSOUT DD SYSOUT=(P,,0010),FCB=STD8 (KEEP DIFF THAN MSGCLASS
//* SO AMOUNTS / COUNTS DO NOT GET IN JCL)

So after the conversion process, I thought of an idea to delete the data if any within the column 73 to 80.

Please help me.
Back to top
View user's profile Send private message

Pedro

Senior Member


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

PostPosted: Fri Sep 12, 2008 3:58 am    Post subject: Reply to: ISREDIT - Deleting the data between the lines 73 a
Reply with quote

Not really a way to delete it... but you should be able to change them all to blanks.

Code:
Change p'^' ' ' 73 80 all

Where ^ is uppercase 6.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Sep 12, 2008 11:32 am    Post subject:
Reply with quote

I usuall use the commands in the following sequence to remove the values of 73-80.

RENUM
UNNUMB
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:02 pm    Post subject:
Reply with quote

Thanks Pedro..That one worked fine as per my concern.
Actually my reqt didn't get fulfilled since the PROC is like

//TSTA8111 EXEC PGM=B808,PARM='&SUBCTL',
// ACCT=('CREATE ABC RCDS')
//SYSOUT DD SYSOUT=(P,,0010),FCB=STD8 (KEEP DIFF THAN MSGCLASS
//* SO AMOUNTS / COUNTS DO NOT GET IN JCL)
//SYSABEND DD SYSOUT=*
//SYSABOUT DD SYSOUT=*

In the PROC, whenever I see FCB=STD8, I will change it to FCB=STD8,HOLD=YES. This will push the comments after it (KEEP DIFF THAN MSGCLASS) across column 72. So I thought the better solution will be to blank out the data if anything in 73 to 80 after the conversion. But after blanking also, when I put JEM on the job, it shows error EXPECTED CONTINUATION NOT RECEIVED.

//STA8110A EXEC PGM=B808,PARM='642',
// ACCT=('CREATE CSP RECORDS')
//SYSOUT DD SYSOUT=(P,,0010),FCB=STD8,HOLD=YES (KEEP DIFF THAN MSGCLA
//* SO AMOUNTS / COUNTS DO NOT GET IN JCL)
//SYSABEND DD SYSOUT=*
***ERROR - DSS6140E - EXPECTED CONTINUATION NOT RECEIVED



Is there anyway to sort it out using ISPF macro

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

Senior Member


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

PostPosted: Fri Sep 12, 2008 9:52 pm    Post subject: Reply to: ISREDIT - Deleting the data between the lines 73 a
Reply with quote

Sorry, I am not familiar with JEM or message DSS6140E. What does your manual say about that message?
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 11:47 pm    Post subject:
Reply with quote

Actually this error message states that:

The previous line of JCL implied that it should be continued on the
next by the presence of a comma as the last character or a non-blank
in column 72, but the next line contained the start of a new
statement.


So will it holds good if I change the code to
"ISREDIT C P'¬' ' ' 72 80 ALL"

There can be scenarios that any of the valid statements in col 72 will also get erased off, right
Back to top
View user's profile Send private message
chidams78
Currently Banned

New User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Sat Sep 13, 2008 1:08 am    Post subject:
Reply with quote

I had put the below logic but it is not working it out

DO WHILE (DATARC = 0)
"ISREDIT F FIRST P'¬' NX 73 80" /* to check whether data is beyween col 73 and 80
DATARC = RC
IF DATARC = 0 THEN
DO
"ISREDIT (LINE) = LINENUM .ZCSR"
"ISREDIT (LONGLNE) = LINE .ZCSR" /* extract that line
POSI3 = POS('-',LONGLNE,71) /* chk if hyphen (-) is there at 72 position
IF POSI3 = 0 THEN DO
"ISREDIT C P'¬' ' ' 72 80" /* if not delete the data from 72 to 80
END
END


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

Senior Member


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

PostPosted: Sat Sep 13, 2008 1:18 am    Post subject: Reply to: ISREDIT - Deleting the data between the lines 73 a
Reply with quote

Quote:
but it is not working it out

Details of 'not working out'?
Back to top
View user's profile Send private message
chidams78
Currently Banned

New User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Sat Sep 13, 2008 1:24 am    Post subject:
Reply with quote

PROC Before change

//SYSOUT DD SYSOUT=(P,,0010),FCB=STD8 (KEEP DIFF THAN MSGCLASS
//* SO AMOUNTS / COUNTS DO NOT GET IN JCL)

PROC after change

//SYSOUT DD SYSOUT=(P,,0010),FCB=STD8,HOLD=YES (KEEP DIFF THAN MSGCLA
//* SO AMOUNTS / COUNTS DO NOT GET IN JCL)

Actually 'A' of MSGCLA comes at 72nd position and it should be blanked out. In the code,we instructed to blank out char from 72 to 80 if '-' is not there in 72nd column (which denotes it is for continuation to next line).
I think since we had positioned at 71st position (POSI3 = POS('-',LONGLNE,71), the cursor is not blanking out the 72nd column data
Back to top
View user's profile Send private message
chidams78
Currently Banned

New User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Sat Sep 13, 2008 1:31 am    Post subject:
Reply with quote

Also If I am changing the Find statement to
"ISREDIT F P'¬' NX 73 80"

the output becomes

//SYSOUT DD SYSOUT=(P,,0010),FCB=STD8,HOLD=YES (KEEP DIFF THAN MSGCLA S

There is space between 'A' and 'S'. The data after col 72 is not fully blanked out.

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

Senior Member


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

PostPosted: Sat Sep 13, 2008 2:51 am    Post subject: Reply to: ISREDIT - Deleting the data between the lines 73 a
Reply with quote

Quote:
I think since we had positioned at 71st position (POSI3 = POS('-',LONGLNE,71), the cursor is not blanking out the 72nd column data

POS( ) is a purely a rexx instruction. I has nothing to do with ISPF.

I think your FIND instruction moves the cursor to column 73, then the subsequent CHANGE does not back up, thus skipping something.

fyi. I notice in your program that sometimes you use 71, 72, and 73 as offsets. It is not clear why all three. You should justify to yourself why.

I feel your logic is wrong.
1. I presume that you have already inserted your data and it caused text to be in cols 73-80.
2. I would not expect a '-' in col 72 to be meaningful after you have already shifted it. Perhaps check if non-blank in 72 before shifting
Back to top
View user's profile Send private message
chidams78
Currently Banned

New User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Sat Sep 13, 2008 3:10 am    Post subject:
Reply with quote

Pedro,

The below code is put forth after the conversion process and thatz what I needed.

You are correct. the code ISREDIT F P'¬' NX 73 80 moves the cursor to 73rd column position.

What I tried to do was to
1. Get the cursor to the line where data is there between 73 and 80.
2. In that line, delete the data from 72nd column (if it was there, as we assume that it will be comments), but before that I should check whether "-" is there in the 72nd column.
"-" means the data in that line continues to the next line. In that case, I should not delete the "-" on the 72nd column.

3. The reason behind searching for the "-" character after 71nd column is to make sure that "-" is there/not there at 72nd column.

Note: Before shifting always the 72 nd column will be blank otherwise JCL will throw error. We need to validate this after the the shifting process. Then can blank out the data from 72nd column (if - is not there at 72)

Hope it is clear now. If not, I can explain with examples
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Sat Sep 13, 2008 9:32 pm    Post subject: Reply to: ISREDIT - Deleting the data between the lines 73 a
Reply with quote

You just repeated what you were already doing. However, I still think you are doing things out of order.

I think you should check for a continuation in col 72 before any shifting is performed.

When you check for '-' after shifting, it is there now because it used to be in another column before the shift. That is, you do not know if a continuation was there before the shift. A '-' after the shift is meaningless.
Back to top
View user's profile Send private message
chidams78
Currently Banned

New User


Joined: 29 May 2006
Posts: 59
Location: India

PostPosted: Sun Sep 14, 2008 10:07 pm    Post subject:
Reply with quote

What u r telling is correct. But assume this scenario.

There is no '-' in 72 line before and after converion. After the conversion, the line is totally shifted and the data passes beyond 72nd column. In this case, we never know whether the data passes beyond 72 col after the conversion. Thatz why I had put the check after the conversion process.

I could have simply blanked out data from 72 to 80 col. In the worst case, if any of the data need to be continued to second line, programmers will put '-' on the 72 col. But my code will simply erase data from 72 to 80 and land up in trouble.

Hope you got the problem in this scenario.

Your advice is appreciated
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Mon Sep 15, 2008 9:28 pm    Post subject: Reply to: ISREDIT - Deleting the data between the lines 73 a
Reply with quote

I am not asking you to code for either of your scenarios... I am recommending that you should check for continuation before shifting.

a. check for continuation in col 72
b. insert new text in line
c. blank out 72- 80
d. put continuation back in col 72

Where you are trying to do something like
b.
c.
a.
d.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Sep 16, 2008 11:58 am    Post subject:
Reply with quote

either that or institute some standards and only allow 1 parm per line.
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 syncsort: copy lines after the keyword shreya19 SYNCSORT 1 Fri Dec 02, 2016 9:47 am
No new posts ODPP(Optim Data privacy Provider) Iss... Rama kishore IBM Tools 1 Mon Nov 07, 2016 5:46 pm
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm
No new posts output data in CSV Format janmejay COBOL Programming 8 Sat Oct 15, 2016 2:20 pm
This topic is locked: you cannot edit posts or make replies. output data in CSV Format janmejay DFSORT/ICETOOL 3 Sat Oct 15, 2016 2:16 pm


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