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
 
How i can write such file in REXX

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

New User


Joined: 27 Nov 2005
Posts: 15
Location: Phoenix

PostPosted: Tue Apr 03, 2007 11:34 am    Post subject: How i can write such file in REXX
Reply with quote

I need to write a file like

SIGNON -

&FROMDSN='GD.GT.TOGE(+1)' -
&FILENAME=GD.GT.TOGE.DYYMMDD -
CASE=YES
SIGNOFF

where YYMMDD is YearMonthDate so for today file would look

SIGNON -

&FROMDSN='GD.GT.TOGE(+1)' -
&FILENAME=GD.GT.TOGE.D070402 -
CASE=YES
SIGNOFF

Could some one help me to write corresponding REXX program for this.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8619
Location: Back in jolly old England

PostPosted: Tue Apr 03, 2007 12:20 pm    Post subject:
Reply with quote

What is the problem that you want resolved.
What have you tried and what went wrong.
Can you post some output from your tests.

The DATE function of REXX is easy to use and will return the current date in a number of formats. Take a look at the manual and see. Just click the manuals button on the top of the page, and then find the REXX manual and you're away.
Back to top
View user's profile Send private message
manihcl85
Warnings : 1

New User


Joined: 11 Jan 2007
Posts: 52
Location: chennai

PostPosted: Tue Apr 03, 2007 2:58 pm    Post subject:
Reply with quote

Hi,

Use the code below
Code:
/*************REXX****************/                             
'FREE ALL'                                                       
"ALLOC DA('TEST.XXXXX.OUT') FI(OUTDD) SHR REUSE"                 
VAR1  = DATE(O)                                                 
DATE1 = SUBSTR(VAR1,1,2)||SUBSTR(VAR1,4,2)||SUBSTR(VAR1,7,2)     
X.1="SIGNON - "                                                 
X.2="  "                                                         
X.3="&FROMDSN='GD.GT.TOGE(+1)'- "                               
X.4="&FILENAME=GD.GT.TOGE.D"||DATE1||" - "                       
X.5="CASE=YES"                                                   
X.6="SIGNOFF"                                                   
"EXECIO * DISKW OUTDD (STEM X. FINIS)"     


Regards,
Mani
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8619
Location: Back in jolly old England

PostPosted: Tue Apr 03, 2007 3:31 pm    Post subject:
Reply with quote

I think that I would allocate the output file to a DD in the JCL. That way you don't have to mess around doing FREE and ALLOC in the REXX. Maybe another couple of changes too-
Code:

/*************REXX****************/                             
QUEUE "SIGNON - "                                                 
QUEUE "&FROMDSN='GD.GT.TOGE(+1)'- "                               
QUEUE "&FILENAME=GD.GT.TOGE.D"SPACE(TRANSLATE(DATE(O),,'/'),0) " - "                       
QUEUE "CASE=YES"                                                   
QUEUE "SIGNOFF"                                                   
"EXECIO "QUEUED() "DISKW OUTDD ( FINIS)"
Back to top
View user's profile Send private message
pankajsoni

New User


Joined: 21 Jun 2006
Posts: 9
Location: Zurich

PostPosted: Wed Apr 04, 2007 12:05 pm    Post subject:
Reply with quote

I think, this is a control card of a connect-direct job. I would recommend you to use Skel and define the date as a variable. You can use Rexx to submit this skel.

Regards,
Soni
Back to top
View user's profile Send private message
atulxp

New User


Joined: 27 Nov 2005
Posts: 15
Location: Phoenix

PostPosted: Fri Apr 06, 2007 8:32 am    Post subject:
Reply with quote

Thanks it resolved my problem
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 ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts Looping REXX - unable to interrupt RAVISANKAR07 CLIST & REXX 3 Wed Dec 06, 2017 1:08 pm
No new posts The same REXX program doesnt work for... jackzhang75 CLIST & REXX 5 Wed Dec 06, 2017 2:51 am
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm

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