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
 

 

Is there a command to temporarily "pause" Natural

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
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    Post subject: Is there a command to temporarily "pause" Natural
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    Post subject: Reply to: Is there a command to temporarily "pause"
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

Site Director


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

PostPosted: Wed Jul 08, 2009 12:22 am    Post subject:
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: 2360
Location: Israel

PostPosted: Thu Jul 09, 2009 10:03 am    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Java & MQSeries All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts Reg:Displaying the particular month o... bhavana yalavarthi All Other Mainframe Topics 4 Sat Jul 08, 2017 8:13 pm
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts RC 20 for Address ISPEXEC "ISRED... pkmurali CLIST & REXX 3 Sun Apr 16, 2017 11:30 pm


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