Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 OUTREC with ALter Command scorp_rahul23 DFSORT/ICETOOL 1 Wed Nov 22, 2017 3:10 pm
No new posts MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm
No new posts Failure after DIR command Hank Watson All Other Mainframe Topics 2 Tue Aug 29, 2017 3:14 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us