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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a batch job to opening a file in EDIT

Status
Not open for further replies.

pbw65

Programmer
Feb 29, 2008
7
US
Hello, I need to open a file in edit using a batch job. I thought I would use a rexx statement that looked something like this:

ADDRESS TSO "EDIT DATASET('"||DSN||"')"

When I run this code I get a return code of 12. The job listing contains no error description of what the actual problem is... Does anyone had any experience using a batch job to open a file in edit?
 
You might consider something like this:
Code:
/* rexx */ 
Parse Arg DSNmember . 
Address ISPEXEC "EDIT DATASET('"DSNmember"') MACRO(CHK1)" 
Exit

The macro CHK1 would be executed within EDIT.
 
Agreed. If you want to edit the data, you'll need a properly defined ISPF Edit Macro. Just remember that ISPF Edit is an ISPF Service, and requires ISPF to work. So, your batch job must provide all of the necessary address spaces and dataset allocations for your code to work:

TSO/E, which is required before ISPF can be used. The program to run for TSO/E is IKJEFT01. After TSO/E is available, ISPF needs to be started. You must issue an ISPSTART CMD(%execname) NEWAPPL(ISR) ... command from TSO/E to make that happen. In order for ISPF to run it must have of its necessary datasets allocated (ISPPROF, ISPPLIB, ISPMLIB, ISPTLIB, ISPLLIB, ISPSLIB, etc.).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top