Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 8593
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: 8593
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us