View previous topic :: View next topic |
Author |
Message |
sendhil Beginner
Joined: 06 Sep 2006 Posts: 17 Topics: 6
|
Posted: Mon Sep 18, 2006 7:11 am Post subject: Find Macro returns 4! |
|
|
Hi,
I am trying to use the Find command in my edit macro.
"F '*' .ZCSR .ZCSR 7"
The line .ZCSR is pointing to has a '*' in the 7th column.But still the above command returns 4.
I tried running the above command directly on the input file.The cursor is hiliting on the '*' which means that its able to process the command.
Any inputs?
Regards
Sendhil. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Sep 18, 2006 7:15 am Post subject: |
|
|
sendhil,
Is your input file a variable block file ? If so you need to add the RDW(4 bytes) also.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
sendhil Beginner
Joined: 06 Sep 2006 Posts: 17 Topics: 6
|
Posted: Mon Sep 18, 2006 7:34 am Post subject: |
|
|
kolusu,
I didnt get you.Where to add the 4 bytes?Could u please elaborate?
Thanks
Sendhil. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Sep 18, 2006 7:41 am Post subject: |
|
|
sendhil,
If your input file is a VB file then you need to look for the string in the 11th byte i.e 7 + 4 bytes of rdw
Code: |
"F '*' .ZCSR .ZCSR 11"
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
sendhil Beginner
Joined: 06 Sep 2006 Posts: 17 Topics: 6
|
Posted: Mon Sep 18, 2006 7:53 am Post subject: |
|
|
kolusu,
Nope its not a VB file.Any other workaround?
Regards
Sendhil. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Sep 18, 2006 8:04 am Post subject: |
|
|
Quote: |
Nope its not a VB file.Any other workaround?
|
Put an S besides the file name and tell us the RECFM of the file
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Mon Sep 18, 2006 12:02 pm Post subject: |
|
|
VB doesn't matter. ISPF does not read the RDW as data. THe problem is more likely that you have line numbers on the left side and ISPF edit macros adjust for that by removing the line number columns when calculating column #s. Try column 1 if you have sequence #s in 1-6 |
|
Back to top |
|
 |
sendhil Beginner
Joined: 06 Sep 2006 Posts: 17 Topics: 6
|
Posted: Wed Sep 20, 2006 7:58 am Post subject: |
|
|
semigeezer,
No. It is not actually having line numbers also.It is a COBOL program And the purpose of hte logic is to insert few lines after a given line.But While inserting I need to replace a Text with the immediately Preceding section name.To find the section name,I am parsing the file using "F P' |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Wed Sep 20, 2006 8:26 am Post subject: |
|
|
What does the PROFILE command show? |
|
Back to top |
|
 |
sendhil Beginner
Joined: 06 Sep 2006 Posts: 17 Topics: 6
|
Posted: Wed Sep 20, 2006 8:38 am Post subject: |
|
|
Code: |
....RECOVERY OFF WARN....NUMBER OFF..............
CAPS OFF....HEX OFF....NULLS OFF....TABS OFF........................
AUTOSAVE ON....AUTONUM OFF....AUTOLIST OFF....STATS ON..............
PROFILE UNLOCK....IMACRO NONE....PACK OFF....NOTE ON................
HILITE REXX CURSOR FIND.............................................
|
|
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Wed Sep 20, 2006 12:30 pm Post subject: |
|
|
I think it is because the cursor is after col 7. Try changing
"F '*' .ZCSR .LINE 7"
to
"F '*' .ZCSR .LINE 7 FIRST"
that will insure that scanning starts at the beginning of the line. |
|
Back to top |
|
 |
sendhil Beginner
Joined: 06 Sep 2006 Posts: 17 Topics: 6
|
Posted: Wed Sep 20, 2006 11:42 pm Post subject: |
|
|
semigeezer,
Thanks a Lot .It worked.
Regards
Sendhil. |
|
Back to top |
|
 |
|
|