| IBM MAINFRAME HELP & SUPPORT FORUMS Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
|
| View previous topic :: View next topic |
| Author |
Message |
hariharan_82
Joined: 18 Apr 2007
Posts: 11
Location: Chennai
|
| Posted: Mon Aug 11, 2008 9:16 pm Post subject: How to switch off msgs in REXX |
|
|
Hi All,
I am using the below macro to submit a job which would unload msgs from the queue for a stipulated time :
The macro is as follows:
Code:
/* REXX */
SAY 'PLEASE ENTER START DATE AND TIME'
PULL INPUT1
PARSE VAR INPUT1 1 V1 3. 3 V2 5. 5 V3 9. 9 V4 11. 11 V5 13. V6
STRTIME = V1||"/"||V2||"/"||V3||","||V4||":"||V5||":"||V6
IDSN = 'START_DATE/TIME='||STRTIME''
SAY 'PLEASE ENTER END DATE AND TIME'
PULL INPUT2
PARSE VAR INPUT2 1 W1 3. 3 W2 5. 5 W3 9. 9 W4 11. 11 W5 13. W6
ENDTIME = W1||"/"||W2||"/"||W3||","||W4||":"||W5||":"||W6
ODSN = 'START_DATE/TIME='||ENDTIME''
"ALLOCATE FILE(ANYDD) SYSOUT(R) WRITER(INTRDR) RECFM(F) LRECL(80)"
"ALLOCATE FILE(JCLDD) DATASET('TOP1.BALASH.UTILS(MQSKL)') SHR"
"EXECIO * DISKR JCLDD (STEM P. "
T.1 = "//"USERID()"B JOB (TTSA,85B8),'TEST',CLASS=T,MSGCLASS=H,"
T.2 = "// NOTIFY=&SYSUID,MSGLEVEL=(1,1)"
X.1 = "QNAME=GS.FW.GOCARS.TPS.TRADES"
X.2 = IDSN
X.3 = ODSN
X.4 = "/*"
X.5 = "//*"
"EXECIO * DISKW ANYDD (STEM T. "
"EXECIO * DISKW ANYDD (STEM P. "
"EXECIO * DISKW ANYDD (STEM X. FINIS"
"FREE FILE(ANYDD)"
"FREE FILE(JCLDD)"
EXIT
/*SAY SUBMIT(JCL.)*/
The macro is working fine but it gives the following msg in the end which I would want to do without:
"FILE JCLDD NOT FREED, DATA SET IS OPEN"
This msg appears though I have coded the FREE FILE statement for JCLDD.
Hariharan |
|
| Back to top |
|
Bill Dennis
Joined: 17 Aug 2007
Posts: 313
Location: Iowa, USA
|
| Posted: Mon Aug 11, 2008 9:37 pm Post subject: |
|
|
| The msg says the file is still OPEN and cannot be FREEd. You need a FINIS when you're done processing. |
|
| Back to top |
|
ofer71
Joined: 27 Dec 2005
Posts: 1962
Location: Israel
|
| Posted: Mon Aug 11, 2008 9:58 pm Post subject: |
|
|
To suppress TSO messages, you may try ADDRESS TSO "PROFILE NOWTPMSG NOINTERCOM".
O. |
|
| Back to top |
|
hariharan_82
Joined: 18 Apr 2007
Posts: 11
Location: Chennai
|
| Posted: Tue Aug 12, 2008 1:13 am Post subject: |
|
|
This is still not working!!
I tried ADDRESS TSO "PROFILE NOWTPMSG NOINTERCOM"
also tried to do a FINIS as below
EXECIO * DISKW ANYDD (STEM T. "
"EXECIO * DISKW ANYDD (STEM P. FINIS"
"EXECIO * DISKW ANYDD (STEM X. FINIS"
Please let me know if I am doing the right thing!! |
|
| Back to top |
|
Pedro
Joined: 01 Sep 2006
Posts: 536
Location: work
|
| Posted: Tue Aug 12, 2008 1:17 am Post subject: Reply to: How to switch off msgs in REXX |
|
|
Quote: also tried to do a FINIS as below
EXECIO * DISKW ANYDD (STEM T. "
"EXECIO * DISKW ANYDD (STEM P. FINIS"
"EXECIO * DISKW ANYDD (STEM X. FINIS"
You refer to ANYDD, but the error message refers to JCLDD. Add the FINIS to the EXECIO for JCLDD. |
|
| Back to top |
|
dick scherrer
Joined: 23 Nov 2006
Posts: 8733
Location: 221 B Baker St
|
| Posted: Tue Aug 12, 2008 1:20 am Post subject: |
|
|
Hello,
Are you getting the same error?
You added another FINIS for ANYDD, but i see none for JCLDD. |
|
| Back to top |
|
hariharan_82
Joined: 18 Apr 2007
Posts: 11
Location: Chennai
|
| Posted: Tue Aug 12, 2008 1:22 am Post subject: |
|
|
| Great!! It worked. Thanks for pointing out the msitake. |
|
| Back to top |
|
Bill Dennis
Joined: 17 Aug 2007
Posts: 313
Location: Iowa, USA
|
| Posted: Tue Aug 12, 2008 1:43 am Post subject: |
|
|
| Back in CLIST-land, I coded command CONTROL NOMSG to turn these types of messages off. Perhaps you can try this for next time. |
|
| Back to top |
|
enrico-sorichetti
Joined: 14 Mar 2007
Posts: 3168
Location: italy
|
| Posted: Tue Aug 12, 2008 2:45 pm Post subject: Reply to: How to switch off msgs in REXX |
|
|
to save and set
old_setting = MSG("OFF")
to reset
z = MSG(old_setting)
see
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IKJ3A320/4.4.3?SHELF=IKJOSE20&DT=20000113164209#SPTMSGFUNC |
|
| Back to top |
|
| |
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM
|