View previous topic :: View next topic
|
Author |
Message |
chidams78 Currently Banned New User
Joined: 29 May 2006 Posts: 59 Location: India
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
I usuall use the commands in the following sequence to remove the values of 73-80.
RENUM
UNNUMB |
|
Back to top |
|
|
chidams78 Currently Banned New User
Joined: 29 May 2006 Posts: 59 Location: India
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Sorry, I am not familiar with JEM or message DSS6140E. What does your manual say about that message? |
|
Back to top |
|
|
chidams78 Currently Banned New User
Joined: 29 May 2006 Posts: 59 Location: India
|
|
|
|
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 |
|
|
chidams78 Currently Banned New User
Joined: 29 May 2006 Posts: 59 Location: India
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Quote: |
but it is not working it out |
Details of 'not working out'? |
|
Back to top |
|
|
chidams78 Currently Banned New User
Joined: 29 May 2006 Posts: 59 Location: India
|
|
|
|
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 |
|
|
chidams78 Currently Banned New User
Joined: 29 May 2006 Posts: 59 Location: India
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
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 |
|
|
chidams78 Currently Banned New User
Joined: 29 May 2006 Posts: 59 Location: India
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
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 |
|
|
chidams78 Currently Banned New User
Joined: 29 May 2006 Posts: 59 Location: India
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
either that or institute some standards and only allow 1 parm per line. |
|
Back to top |
|
|
|