November 28, 2016, 5:59 am
Author:
mistah kurtz
Posted: Mon Nov 28, 2016 7:29 pm (GMT 5.5)
Here is a small rexx program to achieve what you want:
Code: |
/* rexx */
days = "Monday Tuesday Wednesday Thursday Friday Saturday Sunday"
numofweek = 05
dayofwk = wordpos( date(weekday), days )
basedate = date('base')
nextmondate = basedate - dayofwk + numofweek * 7 + 1
say 'day is : ' date(weekday,nextmondate,'base')
say 'date is : ' date('standard',nextmondate,'base') |
↧
November 28, 2016, 6:58 am
Author:
enrico-sorichetti
Subject: Reply to: How to find the first monday of the week.
Posted: Mon Nov 28, 2016 8:28 pm (GMT 5.5)
Quote: |
Here is a small rexx program to achieve what you want: |
unfortunately it does NOT ![icon_cool.gif]()
it calculates the date of the monday of 5th week relative to the current week
as told before ...
given a year and a week number
the computation starts by finding out the date of the monday of the first week of the year
and according to the ISO numbering standard for the week
the first week of a year is the one which contains the thursday
and after that You can add 7 * week-number
see here for a discussion and a REXX snippet to convert dates to/from a ISO week representation
http://www.ibmmainframeforum.com/clist-rexx/topic3963.html?hilit=iso
_________________
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
↧
↧
November 28, 2016, 8:21 am
Author:
mistah kurtz
Posted: Mon Nov 28, 2016 9:51 pm (GMT 5.5)
Quote: |
It calculates the date of the monday of 5th week relative to the current week |
Yes. That's correct. I misunderstood the requirement.
↧
November 28, 2016, 2:42 pm
Author:
Nikhilesh Tomar
Subject: ENQMODEL - ENQ SYSPLEX WIDE
Posted: Tue Nov 29, 2016 4:12 am (GMT 5.5)
Hi All,
I have used ENQ and DEQ commands in an CICS environment and I can understand the concept from the below definitions, how the ENQ/DEQ command works
"The resource to be enqueued on must be identified by one of the following methods:
Specifying a data area that is the resource. It is the location (address) of the data area in storage that matters, not its contents.
Specifying a data area that contains a unique argument (for example, an employee name) that represents the resource. It is the contents of the data value that matters, not its location. LENGTH is required; the presence of the LENGTH option tells CICS to enqueue on the contents of the data value."
but I am trying to achieve an ENQ/DEQ sysplex-wide or we can say I am trying to achieve serialized access on the same resource from different CICS environments. From below information I can understand that there is a concept of ENQMODEL for the same ![icon_smile.gif]()
However I am not able to find any example for the same.
Below information I gathered while searching:-
When an EXEC CICS ENQ (or DEQ) command is issued for a resource whose name matches that of an installed ENQMODEL resource definition, CICS checks the value of the ENQSCOPE attribute to determine whether the scope is local or sysplex-wide. If the ENQSCOPE attribute is left blank (the default value), CICS treats the ENQ as local to the issuing CICS region. If no ENQMODEL matches the resource name, the scope of the ENQ command is local. See the CICS Resource Definition Guide for more information about the ENQMODEL resource definition.
Also can you please help me understand the above concept.
1 "When an EXEC CICS ENQ (or DEQ) command is issued for a resource whose name matches that of an installed ENQMODEL resource definition"
Does this mean that the resource name was pre-supplied while installing the ENQMODEL ? and before that I am confused on what installed ENQMODEL stands here for ?
2. ENQSCOPE is by default left black and provided some value (which I am assuming as of any name for example A) which can be provided while issuing an enque command. Please correct me as I am not sure on this.
3. I also read on the concept of GRS but I am not clear on the same as well.
Thankyou all!!
_________________
Regards,
Nick
↧
November 28, 2016, 3:10 pm
Author:
Rohit Umarjikar
Posted: Tue Nov 29, 2016 4:40 am (GMT 5.5)
"Enqmodel" on Google search gave me enough links to do a research, did you do that?
_________________
Regards,
Rohit Umarjikar
"Knowledge is knowing that a tomato is a fruit, but Wisdom is knowing not to put it in a fruit salad."
↧
↧
November 28, 2016, 3:19 pm
Author:
Nikhilesh Tomar
Subject: Reply to: ENQMODEL - ENQ SYSPLEX WIDE
Posted: Tue Nov 29, 2016 4:49 am (GMT 5.5)
Hi Rohit,
I did the search and that's how have gathered all the above information ![icon_smile.gif]()
Please can you share some useful links with example of enqmodel apart from the above information.
_________________
Regards,
Nick
↧
November 28, 2016, 4:41 pm
Author:
Robert Sample
Posted: Tue Nov 29, 2016 6:11 am (GMT 5.5)
ENQMODEL is defined and installed through RDO (the CEDA transaction). If you want to use a SYSPLEX ENQMODEL, you MUST define the ENQMODEL with a non-blank ENQSCOPE. You do not have an option to do this at run time. And this definition must exist in EACH region you want to control the ENQ for. If you do not have access to the CEDA transaction, you must work with your site support group CICS system programmer to do the definition and installation. The manual does not list any restrictions on the ENQSCOPE name (other than length).
When you use EXEC CICS ENQ, you provide the ENQMODEL name (that was defined by the CEDA transaction) in the RESOURCE name if you want the scope to be SYSPLEX instead of LOCAL. From the RDO manual:Quote: |
Combined with an ENQMODEL resource, CICS® uses MVS⢠global resource serialization to provide sysplex-wide protection of application resources.
Local enqueues within a single CICS region are managed within the CICS address space. Sysplex-wide enqueues that affect more than one CICS region are managed by GRS.
The ENQSCOPE attribute of an ENQMODEL resource, defines the set of regions that share the same enqueue scope. If the ENQSCOPE attribute is left blank (the default value), CICS treats any matching ENQ or DEQ as local to the issuing CICS region. If the ENQSCOPE is non-blank, CICS treats the ENQ or DEQ as sysplex-wide and passes a queue name and the resource name to GRS to manage the enqueue.
The CICS regions that need to use sysplex-wide enqueue or dequeue function must all have the required ENQMODELs defined and installed. The recommended way to ensure this is for the CICS regions to share a CSD, and for the initialization group lists to include the same ENQMODEL groups. |
GRS (global resource serialization) is the z/OS mechanism for providing controlled access to resources that cannot be shared (serialization). It can be very complex and there are manuals and Redbooks that you can consult for more information. If you are doing ENQ / DEQ in CICS, you need to spend some time reading up on GRS to understand at least at a high level what GRS does.
_________________
TANSTAAFL
The first rule of code reuse is that the code needs to be worth re-using.
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth
↧
November 28, 2016, 7:51 pm
Author:
shetttigarvivek
Subject: PDSFAST VERIFY - What does it really do ?
Posted: Tue Nov 29, 2016 9:21 am (GMT 5.5)
I have come across PDSFAST and cant really find any documentation explaining the supported sysin cards on the internet.
Code: |
//VERIFY EXEC PGM=PDSFAST,
// REGION=4096K
//SYSPRINT DD SYSOUT=*
//PDS DD DSN=&NAME, DISP=SHR
//SYSUT3 DD UNIT=SYSDA, SPACE=(CYL,(5,5))
//SYSUT4 DD UNIT=SYSDA, SPACE=(CYL,(5,5))
//SYSIN DD * VERIFY INDD=PDS,LIST=NO
/* |
I have to migrate this onto Linux. So i was wondering what the VERIFY really does.
I found a link that says
Its checking for I/O errors. What does this really mean for a PDS ?
Thanks !
↧
November 28, 2016, 9:46 pm
Author:
steve-myers
Posted: Tue Nov 29, 2016 11:16 am (GMT 5.5)
These are things I think it should be looking for
- All PDS data sets -
- Wrong length records and true I/O errors
- First record address in a directory does not point to a true first record
- Directory problems
- Unkeyed records
- Missing EOF entry
- Other format problems
- Load modules
- First text record address in directory does not point to a valid text record
- Number of control or control/rld records for the first text record on the directory entry is wrong
- Conflict between first record data in directory entry and similar data in the control record for the first text record
- Multiple format issues in control and control/rld records.
- Count of control and control/rld records in control or control/rld record for a text record are wrong
I'm sure there are things I missed, but this would get you started.
↧
↧
November 29, 2016, 4:51 am
Author:
sundaram.naveen
Subject: JCL to delete component in a package
Posted: Tue Nov 29, 2016 6:21 pm (GMT 5.5)
Hi Guys,
Just wanted to know if there is any possibility of creating a JCL that deletes a member from a package just like the way changeman does
↧
November 29, 2016, 6:28 am
Author:
Nic Clouston
Posted: Tue Nov 29, 2016 7:58 pm (GMT 5.5)
This is totally unclear. Are you using some version control system other than Changeman and you want to replicate the batch deletion? Or are you using Changeman and you want to do your deletes in a batch job? Or something else?
What you have probably not done is refer to the documentation, referred to the online help, referred to your colleagues, read the menu options properly, read the screens properly to see the BATCH option.
In any case, I doubt that this is a JCL question but some product question.
_________________
Regards
Nic
↧
November 29, 2016, 6:30 am
Author:
dbzTHEdinosauer
Posted: Tue Nov 29, 2016 8:00 pm (GMT 5.5)
since changeman submits jcl that it generates based on interactions with the gui,
of course you can create your own job and submit it.
if you would investigate the subfiles within the job in sdsf or whatever you use,
you can find the jcl that was submitted.
it is not located where the jcl spools, but within the second or third sub.spool file (i forget)-
but the fact that you do not know that, or have found it on your own,
leads me to suggest that you do not do it,
at least until your experience and skills level have greatly improved.
you run the risk of doing damage to the package, or the database.
besids, the reason the gui was bought and paid for
is to insure that all the users submit good jcl,
and possibly more importantly,
authorized actions.
the time you think that you are saving by skiipping the gui,
maybe used up looking for a new job.
_________________
Dick Brenholtz
Programming Languages, SQL and JCL have the tendency to do what you coded,
not necessarily what you wanted.
↧
November 29, 2016, 6:37 am
Author:
steve-myers
Posted: Tue Nov 29, 2016 8:07 pm (GMT 5.5)
- JCL cannot manipulate data in any way. In other words, "JCL" cannot perform this task. Only programs that operate in an environment specified by JCL can perform this task.
- Programs like the Changeman product you mentioned use standard programs like an Assembler, compilers and the Binder to affect the binary form of package. In some simple cases a Changeman will use selected low level APIs such as the STOW function to delete a member of a PDS.
- If you direct Changeman to remove a component from a package, it most likely will use the Binder to remove the component from load modules and the STOW function to delete entire members.
- Certainly you can simulate this using ordinary programs outside of Changeman. though you must understand how Changeman inserts the component into the package.
- You should be aware that Changeman will reinsert the component the next time it rebuilds the package. So you should be doing this through Changeman.
↧
↧
November 29, 2016, 7:54 am
Author:
Rohit Umarjikar
Posted: Tue Nov 29, 2016 9:24 pm (GMT 5.5)
It should not be done through local batch, I don't think that's even permitted to all RACF ID by any site. Why do you need to do this at first place?
_________________
Regards,
Rohit Umarjikar
"Knowledge is knowing that a tomato is a fruit, but Wisdom is knowing not to put it in a fruit salad."
↧
November 29, 2016, 7:55 am
Author:
Graeme Westerman
Subject: How does a called pgm know if its called from CICS or Batch
Posted: Tue Nov 29, 2016 9:25 pm (GMT 5.5)
Hi, we have a Cobol developer who is trying to call a subroutine from both CICS and Batch. The subroutine obviously has to pass back data to the calling program. How does the called program know that the calling program is batch or CICS?
Thanks
Graeme
↧
November 29, 2016, 8:14 am
Author:
Robert Sample
Posted: Tue Nov 29, 2016 9:44 pm (GMT 5.5)
Quote: |
How does the called program know that the calling program is batch or CICS? |
Why does it care? As long as the COBOL program isn't doing anything prohibited under CICS (such as reading a file) and has the DFHEIBLK and DFHCOMMAREA defined in the calling sequence, the same subprogram should run under CICS and batch without knowing -- or caring -- where it is running.
_________________
TANSTAAFL
The first rule of code reuse is that the code needs to be worth re-using.
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth
↧
November 29, 2016, 8:17 am
Author:
Rohit Umarjikar
Posted: Tue Nov 29, 2016 9:47 pm (GMT 5.5)
Welcome!!
Couple of replies from bottom should help you knowing that.
http://ibmmainframes.com/about27389.html
_________________
Regards,
Rohit Umarjikar
"Knowledge is knowing that a tomato is a fruit, but Wisdom is knowing not to put it in a fruit salad."
↧
↧
November 29, 2016, 8:54 am
Author:
Nikhilesh Tomar
Subject: Reply to: ENQMODEL - ENQ SYSPLEX WIDE
Posted: Tue Nov 29, 2016 10:24 pm (GMT 5.5)
Thankyou Robert for explaining ![icon_smile.gif]()
I have queries on below lines:-
1 "When you use EXEC CICS ENQ, you provide the ENQMODEL name (that was defined by the CEDA transaction) in the RESOURCE name if you want the scope to be SYSPLEX instead of LOCAL."
If I am trying serialize access to a particular record from a VSAM file, does this mean I have to define a ENQMODEL with the key of that particular record ?
_________________
Regards,
Nick
↧
November 29, 2016, 9:06 am
Author:
balaji81_k
Subject: Thankyou
Posted: Tue Nov 29, 2016 10:36 pm (GMT 5.5)
Hi Every one,
Many thanks for your suggestion and ideas . I have done by using SORT
by capturing time using &TIME and along with populating 'Y' .
One more file created to have 'Y' only if time(minute ) > 30 . Based on the file status (empty or not) logic will handle accordingly .
_________________
dear peoples,
i want to join these this group in order to
enrich my knowledge in mainframe.
↧
November 29, 2016, 9:56 am
Author:
Bill Woodger
Subject: Reply to: How does a called pgm know if its called from CICS or Batch
Posted: Tue Nov 29, 2016 11:26 pm (GMT 5.5)
Rohit,
Other than the other Bill's Assembler, what is there that is of use relating to the question? It is also eight years old.
Graeme Westerman,
As Robert asked, why does the program need to know? There are some very direct ways, but if the program doesn't need to know, why even bother with those?
↧