View previous topic :: View next topic
|
Author |
Message |
ap_mainframes
Active User
Joined: 29 Dec 2005 Posts: 181 Location: Canada
|
|
|
|
Hi,
I am facing a problem while writing a rexx.
I am submitting a job using rexx.
My Job creates a dataset and then through the same rexx I need to edit it ( using macros ).
How to do this ??? As you never know when your job will be completed and that dataset will be created.
Please advise.Thanks for all the help.
ap_mainframes |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
From the same job, after the dataset was created, use the ISPF service EDIT with the MACRO parameter. Supply a name of an edit-macro to be used when the dataset will open for EDIT.
O. |
|
Back to top |
|
|
ap_mainframes
Active User
Joined: 29 Dec 2005 Posts: 181 Location: Canada
|
|
|
|
Quote: |
From the same job, after the dataset was created |
What exactly do you mean by that??
Can you please give some example???
Thanks
Ap[/quote] |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Help us out a little bit here. I think we're all presuming that you have a job, JOBA, running. JOBA contains a REXX exec that ultimately submits another job, JOBB. JOBB catalogs a dataset and finishes. Does the exec in JOBA know what the dataset name is? Can the exec in JOBA contain a loop that executes continously until the dataset is cataloged? Or, can the exec in JOBA (because it SHOULD know the jobid of JOBB) look for the EOJ of JOBB via a TSO STATUS command? |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
It can all be in the same job, same REXX: ALLOCATE and EDIT. Even the Edit-Macro can be generated from within the REXX, to be used in the EDIT service.
O. |
|
Back to top |
|
|
ap_mainframes
Active User
Joined: 29 Dec 2005 Posts: 181 Location: Canada
|
|
|
|
No..I have a rexx thru which I am submitting a job.
Please see my rexx code below
Code: |
QUEUE '//'UID'AB JOB (DFCED,WD1),''FD BKUP FRM CSTID'',CLASS=S,'
QUEUE '// NOTIFY='UID',TIME=1440,MSGCLASS=T'
QUEUE '//STEP000 EXEC PGM=IEFBR14 '
QUEUE '//DD1 DD DSN=DFC2.'UID'.GLOB.FFB.COMPARE.REPORT,'
QUEUE '// DISP=(MOD,DELETE,DELETE),'
QUEUE '// SPACE=(TRK,(0,0)) '
QUEUE '//************************************ '
QUEUE '//FASTEP EXEC PGM=FILEAID,REGION=6M'
QUEUE '//STEPLIB DD DISP=SHR,DSN=SYS4.FILEAID.V890.LOAD'
QUEUE '//SYSPRINT DD SYSOUT=*'
QUEUE '//SYSLIST DD DSN=DFC2.BEST.GLOB.FFB.COMPARE.REPORT,'
QUEUE '// DCB=(LRECL=183,BLKSIZE=1830),'
QUEUE '// DISP=(NEW,CATLG,DELETE),'
QUEUE '// SPACE=(CYL,(50,50)) '
QUEUE '//DD01 DD DSN='BKFILE','
QUEUE '// DISP=SHR'
QUEUE '//DD01C DD DSN='DDN','
QUEUE '// DISP=SHR'
QUEUE '//DD01CP DD DSN=ZZZZZ,'
QUEUE '// DISP=SHR'
QUEUE '//DD01SC DD DISP=SHR,'
QUEUE '// DSN=XXXXX(SELECT)'
QUEUE '//DD01SCN DD DISP=SHR,'
QUEUE '// DSN=YYYY(SELECT)'
QUEUE '//DD01RL DD DSN=PF00.CP000000.HFNP.CPY,'
QUEUE '// DISP=SHR'
QUEUE '//DD01RLN DD DSN=PF00.CP000000.HFNP.CPY,'
QUEUE '// DISP=SHR '
QUEUE '//SYSIN DD *'
QUEUE '$$DD01 COMPARE'
QUEUE '/*'
"SUBMIT * "
|
Here, this rexx (and in turn job) is creating a dataset called as DFC2.BEST.GLOB.FFB.COMPARE.REPORT.
I need to edit this dataset, in this very rexx.
How to do this ??
Thanks for all the help |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
You will have to wait until the job ends successfully (which is a bad practice, IMHO). When the job completes succesfully, use the ISPF service EDIT, or use EXECIO to manipulate the data in the dataset.
O. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Didn't I already provide an answer? |
|
Back to top |
|
|
ap_mainframes
Active User
Joined: 29 Dec 2005 Posts: 181 Location: Canada
|
|
|
|
Superk,
I didnt get the solution you provided.
Can you please explain??
ofer71,
Whats the solution to this then???
Thanks |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Add a step to your QUEUEd job.
O. |
|
Back to top |
|
|
ap_mainframes
Active User
Joined: 29 Dec 2005 Posts: 181 Location: Canada
|
|
|
|
And what will that step do ???
Actually I am an assembler guy and have never worked on REXX( just know the basics ) , so please explain, if possible.
ap |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
The additional step will run another REXX. This REXX will issue the ISPF service EDIT with the MACRO parameter.
O. |
|
Back to top |
|
|
ap_mainframes
Active User
Joined: 29 Dec 2005 Posts: 181 Location: Canada
|
|
|
|
Thanks!
However can you please examplify how do we call rexx from JCL??
I tried to make a search but couldnt get a proper search results. |
|
Back to top |
|
|
|