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

Error while creating a MEMBER in a PDS via REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ramsee

New User


Joined: 06 Jan 2011
Posts: 53
Location: Chennai

PostPosted: Tue Oct 15, 2013 3:35 pm
Reply with quote

Hi All,

Warm Greetings!!

I am trying to create a new member[A13288] in an already created PDS[USERNAME.TSO.LOG], the below code is used

Code:

ADDRESS TSO
"ALLOC DA('USERNAME.TSO.LOG(A13288)') NEW SPACE(1,5)
DSORG(PS) RECFM(F) LRECL(80) BLKSIZE(3120)"


I need to create this File once the REXX code executes, Normally execution will happen by EX command, not by JCL run.

PDS Info:
Record format . . . : FB
Record length . . . : 80
Block size . . . . : 3120
1st extent tracks . : 1
Secondary tracks . : 5
Data set name type : PDS

While executing the above code the following error occurred.

Code:

114 *-* ADDRESS TSO
    116 *-* "ALLOC DA('USERNAME.TSO.LOG(A"date1")') NEW TRACKS SPACE(1,5)
     DSORG(PS) RECFM(F) LRECL(80) BLKSIZE(3120)"
        >L>   "ALLOC DA('USERNAME.TSO.LOG(A"
        >V>   "13288"
        >O>   "ALLOC DA('USERNAME.TSO.LOG(A13288"
        >L>   ")') NEW TRACKS SPACE(1,5)            DSORG(PS) RECFM(F) LRECL(80)
  BLKSIZE(3120)"
        >O>   "ALLOC DA('USERNAME.TSO.LOG(A13288)') NEW TRACKS SPACE(1,5)
     DSORG(PS) RECFM(F) LRECL(80) BLKSIZE(3120)"
 DATA SET USERNAME.TSO.LOG NOT ALLOCATED+
 IGD17101I DATA SET USERNAME.TSO.LOG
 NOT DEFINED BECAUSE DUPLICATE NAME EXISTS IN CATALOG
 RETURN CODE IS 8 REASON CODE IS 38 IGG0CLEH
        +++ RC(12) +++


The System is trying to create PS file in the name of the PDS once again.

I am not able to identify the error created by me, Kindly let me know what was my mistake in the above code.

Thanks in advance for the help and time.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Tue Oct 15, 2013 3:45 pm
Reply with quote

No, it is the case that TSO is attempting to create a PS data set by that name; rather, once a PDS(E) exists, a new member can be created in it by allocating it with the new name and a non-NEW status.
Back to top
View user's profile Send private message
Ramsee

New User


Joined: 06 Jan 2011
Posts: 53
Location: Chennai

PostPosted: Tue Oct 15, 2013 4:17 pm
Reply with quote

Hi,

Thanks for your time to help me out,

I tried by using the following code:
Code:

"ALLOC DA('AAAA.TSO.LOG(A1234)') TRACKS SPACE(1,5)
DSORG(PO) RECFM(F) LRECL(80) BLKSIZE(3120)"


as per your suggesstion i removed the "NEW" Keyword and changed the PDS name, as a result i am able to create the PDS but not able to create a MEMBER into it.

Please let me know how to proceed further.
Back to top
View user's profile Send private message
Ramsee

New User


Joined: 06 Jan 2011
Posts: 53
Location: Chennai

PostPosted: Tue Oct 15, 2013 5:30 pm
Reply with quote

Hi All,

I have once again deleted the PDS and created it. Then i ran the below code, now i am able to create a MEMBER within a PDS. Thanks a lot for the time.

Code:

"ALLOC FI(XXOUT) DA('USER.TSO.LOG(SAMPLE1)') SHR"
PUSH "RECORD-1"
"EXECIO * DISKW XXOUT (FINIS"
"FREE F(XXOUT)"


My learning on the above mistake:
I tried to create an empty member inside the PDS, so i got a lot of errors and MY USERNAME.TSO.LOG PDS was also not created properly initially.

Please correct me if my understanding is wrong.

Thanks for the time.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Tue Oct 15, 2013 7:52 pm
Reply with quote

There is no problem with creating an empty member, but, as in your latest example, you must allocate a pre-existing data set with a status of SHR or OLD (if you want exclusive use), not NEW. You did come to that realization yourself, and were willing to experiment to find if your understanding is correct, for which I compliment you.
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top