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
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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