View previous topic :: View next topic |
Author |
Message |
yugee Beginner
Joined: 17 Sep 2005 Posts: 25 Topics: 8
|
Posted: Wed Sep 28, 2005 10:50 pm Post subject: |
|
|
Hi Kolusu,
I think this new SETLPAR pds idea perfectly suits my requirement.
Could you please give more details about this REXX code?.(how to create a PDS, how to write data into it..etc).
Thanks a lot for your suggestions..
Yugee |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Thu Sep 29, 2005 12:23 am Post subject: |
|
|
yugee,
You don't have to create the PDS using REXX. Just use JCL to create a PDS. Allocate your PDS to DD NEWPDS and this should be given in the same step as your rexx program. This way, JCL will allocate as well as create a new PDS+Member for you. All you need to do is to write data to it.
Code: |
//NEWPDS DD DSN=YOUR.NEW.PDS(MEM),
// DISP=(MOD,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(10,1,10),RLSE),
// DCB=(RECFM=FB,LRECL=80)
|
Now use the following code to write data to the PDS member.
Code: |
/* REXX */
SETTING = MSG('OFF')
SYSNAME = MVSVAR(SYSNAME)
SYSID = SUBSTR(SYSNAME,1,4)
SELECT
WHEN(SYSID='TA01') THEN
OUT.1 = '// SET LPAR=1 '
WHEN(SYSID='TA02') THEN
OUT.1 = '// SET LPAR=2 '
WHEN(SYSID='TA03') THEN
OUT.1 = '// SET LPAR=3 '
OTHERWISE
OUT.1 = '// SET LPAR=9 '
END
OUT.0 = 1
"EXECIO "OUT.0" DISKW NEWPDS (STEM OUT. FINIS"
|
Hope this helps,
Thanks,
Phantom |
|
Back to top |
|
|
yugee Beginner
Joined: 17 Sep 2005 Posts: 25 Topics: 8
|
Posted: Thu Oct 06, 2005 5:34 pm Post subject: |
|
|
Hi Phantom,
This idea looks good, but instead of PDS, it would be better to have a Flat file. I tried this option, but it is not writing anything into the NEWPDS. Could you please check the REXX code. Thanks a lot for ur suggestions.
Yugee |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12370 Topics: 75 Location: San Jose
|
Posted: Thu Oct 06, 2005 7:39 pm Post subject: |
|
|
Quote: |
This idea looks good, but instead of PDS, it would be better to have a Flat file
|
Yugee,
The JCL INCLUDE statement works only with a PDS.
Quote: |
I tried this option, but it is not writing anything into the NEWPDS. Could you please check the REXX code.
|
The code works fine. You need to show us what you did and any error messages you got during execuetion
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
yugee Beginner
Joined: 17 Sep 2005 Posts: 25 Topics: 8
|
Posted: Tue Oct 18, 2005 6:45 pm Post subject: |
|
|
Hi,
This is the error I am getting:
----------------------------------------------------------------------
System abend code B14, reason code 00000004.
Abend in host command EXECIO or address environment routine TSO.
EXECIO error while trying to close a DD.
READY
END
----------------------------------------------------------------------- |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12370 Topics: 75 Location: San Jose
|
Posted: Tue Oct 18, 2005 9:06 pm Post subject: |
|
|
Yugee,
Please post the entire error messages with the error message code. Messages starting with IECxxx. In this case the error message was IEC217I. If you looked it up you would have found this
Code: |
A duplicate name was found in the directory of a partitioned data set. The CLOSE routine attempted to add a member name to the directory using the STOW macro instruction, but a code of 4 was returned, indicating that the member already exists. Specify a different member name, or remove the old member name using the IEHPROGM utility, or specify DISP=OLD on the DD statement.
|
Check this link for detailed explanation of the error message IEC217I
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2M751/SPTEE217I
Check this link for detailed explanation of the error message SB14
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2H751/SPTM014719
Hope this helps...
Cheers
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
yugee Beginner
Joined: 17 Sep 2005 Posts: 25 Topics: 8
|
Posted: Wed Oct 19, 2005 10:26 am Post subject: |
|
|
Hi Kolusu,
It worked now. It is wrinting the record into the NEWPDS. but here I am facing some other issue. I have the NEWPDS member in TEST.PARMLIB pds. But when I submit the job and if that particular PDS is open, then job is on HOLD and it says the TEST.PARMLIB(NEWPDS) is needed by the job, please release it. in production it would be so common that some one or other will be browsing this PDS. is there any possibility to remove this dependency. and one more issue I faced is, when i put this particular statement in the JCL, it is giving the error in prep.
[color=blue]// INCLUDE MEMBER=TEST.PARMLIB(NEWPDS)[/color]
[color=red]ERROR: .JCPC JCP0502E INCLUDE 'NEWPDS' CANNOT BE LOCATED -- (J)36[/color]
Do I need to create the member NEWPDS in JCLLIB?.
Please suggest on this.
Thanks,
Yugee |
|
Back to top |
|
|
yugee Beginner
Joined: 17 Sep 2005 Posts: 25 Topics: 8
|
Posted: Wed Oct 19, 2005 10:28 am Post subject: |
|
|
eventhough I have not opened the NEWPDS member in TEST.PARMLIB, is says that the whole PDS is needed for the job. |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Thu Oct 20, 2005 12:26 am Post subject: |
|
|
Yugee,
Quote: |
eventhough I have not opened the NEWPDS member in TEST.PARMLIB, is says that the whole PDS is needed for the job.
|
When you create a dataset/member using DISP=(MOD,CATLG) JCL tries takes Exclusive lock over the dataset. Try giving DISP=SHR.
Quote: |
when i put this particular statement in the JCL, it is giving the error in prep.
|
I think you can ignore that. I believe you are creating a member during run time with some arbitrary name. If the member name is going to be static and if you are going to update the contents of the same member again and again, then use DISP=SHR and better create the member before the first run.
Hope this helps,
Thanks,
Phantom |
|
Back to top |
|
|
|
|