IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Is there a command to temporarily "pause" Natural


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
David Smith

New User


Joined: 28 Oct 2008
Posts: 9
Location: WA state

PostPosted: Tue Jul 07, 2009 11:14 pm
Reply with quote

I've come across a program that produces messages. It checks to see if the current time (*TIMN) matches the time of the last message produced (HHMMSST), as it does not want to set any messages with the same create time.

If the current time matches the saved time #TIME, it adds 10 to #TIME and stores that instead of *TIMN. This has led to some records with create time seconds = to 60, which is invalid.

I can think of several relatively easy fixes. Such as resetting seconds and adding to minutes (checking that minutes don't go over 59 as well), or to use a repeat loop until the current time is not equal to the saved time.

But, it got me wondering if there is some type of Natural command that efficiently stops processing momentarily? For example, if *TIMN = saved time, wait 1 second, then move *TIMN to the create time?
Back to top
View user's profile Send private message
David Smith

New User


Joined: 28 Oct 2008
Posts: 9
Location: WA state

PostPosted: Tue Jul 07, 2009 11:28 pm
Reply with quote

I just ran a test using the REPEAT UNTIL idea. And it spun thru the loop several thousand times before the time was not equal icon_eek.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jul 08, 2009 12:22 am
Reply with quote

Hello,

Yup, that method is only good for increasing cpu usage. . .

Changing to use some other uniqueness value might be considered. . .
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Jul 09, 2009 10:03 am
Reply with quote

Software AG provides the SUSPEND example program that couled easily be located in SYSEXTP library (or MAINMENU --> Example Libraries --> Examples of TP-Specific Functions).

SUSPEND uses the CMROLL assembler program, and is supported under all environments (CICS/BATCH/TSO etc.).

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

New User


Joined: 28 Oct 2008
Posts: 9
Location: WA state

PostPosted: Fri Jul 10, 2009 10:08 pm
Reply with quote

Interesting! I gave this a try and it works great. I may utilize a call to CMROLL in the program. Thank you icon_biggrin.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
Search our Forums:

Back to Top