Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ISPEXEC EDIT for a large volumn dataset

Status
Not open for further replies.

dumdumdum

Programmer
Aug 27, 2003
3
HK
Hi,

Here my rexx statement:
/* REXX */
ADDRESS TSO
Parse Upper Arg Params
Parse Var Params pFile pMacro

say pFile
say pMacro
"ISPEXEC EDIT DATASET('"pFile"') MACRO("pMacro")"
Say RC

EXIT RC

Here my pMacro:
ISREDIT "MACRO"
ISREDIT "RES"
ISREDIT "C 48 249 '"' '' ALL"
ISREDIT "C 48 249 ''' '' ALL"
ISREDIT "C 48 249 '*' 'IMPORTANT' ALL"
ISREDIT "C 48 249 ',' '' ALL""
ISREDIT "END"
EXIT

I found that pMacro not work & RC=4. I suspected that the pFile is too large, over 10000 tracks with more than 2 million records (recl = 249).

Please advise!

Thx & Rgds,
dumdum
 
First, try running it without the pMacro, to see if ISREDIT can cope with the file on its own. Then put a say 'rc = ' rc; after each of the ISREDIT calls in the macro, to see which one is causing the problem.
 
A return code 4 from a macro means the dataset has not been save so I am assuming your strings were not changed. I think you've screwed up your quotes with the " and '. It appears you're trying to change a " to a blank, but as you're using the " to identify your macro commands in the REXX, then when you have a second " it's treating the next strings as variables which is invalid.

You might have to express the quotes as hex values and do something like this;
Code:
ISREDIT "C 48 249 x'7F' '' ALL"
ISREDIT "C 48 249 x'7D' '' ALL"
ISREDIT "C 48 249 '*' 'IMPORTANT' ALL"
ISREDIT "C 48 249 ',' '' ALL"

In fact I just noticed you had 2 " after the last ALL so I think you encountered some pasring failures and threw in an extra on for luck?

As a tip, if you do a 'Hilite Rexx' on the command line, you will see the colours are un-matched in you macro. Green for variables, white for strings, red for functions, and yellow for operators or something like that. If you have an un-expected mix of colours you know something's wrong at a glance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top