Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Creates a dataset and then through the same rexx to edit

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Thu Aug 17, 2006 4:30 pm    Post subject: Creates a dataset and then through the same rexx to edit
Reply with quote

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
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu Aug 17, 2006 5:46 pm    Post subject:
Reply with quote

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
View user's profile Send private message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Fri Aug 18, 2006 9:14 am    Post subject:
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Fri Aug 18, 2006 9:26 am    Post subject: Re: Creates a dataset and then through the same rexx to edit
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Fri Aug 18, 2006 12:18 pm    Post subject:
Reply with quote

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
View user's profile Send private message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Mon Aug 21, 2006 12:40 pm    Post subject:
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Aug 21, 2006 2:30 pm    Post subject:
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Mon Aug 21, 2006 3:55 pm    Post subject: Re: Creates a dataset and then through the same rexx to edit
Reply with quote

Didn't I already provide an answer?
Back to top
View user's profile Send private message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Mon Aug 21, 2006 7:06 pm    Post subject:
Reply with quote

Superk,

I didnt get the solution you provided.
Can you please explain??

ofer71,
Whats the solution to this then???

Thanks
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Aug 21, 2006 7:09 pm    Post subject:
Reply with quote

Add a step to your QUEUEd job.

O.
Back to top
View user's profile Send private message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Tue Aug 22, 2006 9:40 am    Post subject:
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Aug 22, 2006 10:07 am    Post subject:
Reply with quote

The additional step will run another REXX. This REXX will issue the ISPF service EDIT with the MACRO parameter.

O.
Back to top
View user's profile Send private message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Wed Aug 23, 2006 10:03 am    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts exec macro in the end of edit anatol CLIST & REXX 1 Fri Sep 22, 2017 5:10 am
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 9 Tue Sep 05, 2017 4:24 pm
No new posts How to Run Rexx Macro? Kalaivignesh CLIST & REXX 5 Fri Sep 01, 2017 9:08 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us