View previous topic :: View next topic
|
Author |
Message |
Rishi Khare
New User
Joined: 13 Aug 2007 Posts: 16 Location: Mumbai
|
|
|
|
HI ,
I am trying to allocate a PDS and A member in the same REXX code ,
well my requirement is
1. IF the PDS is not present i.e. SYSDSN( ) /= "OK"
then allocate the PDS
2. IF the Member is not present ( same as above ) then allocate the
member for output dd.
let me know if anyone can help me out on this .
Thanks,
Rishi/K |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
What is the exact problem? Your requirements sounds clear for me...
O. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Keep in mind that to create a member, you do not "allocate" it. Simply write the member into an existing PDS. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
From an offline PM
Quote: |
How do i write a member directly with out allocating it to a DD name |
Per your original post, it appeared that you were gong to allocate the PDS to a ddname if it existed and you would create the pds if it did not.
Once the pds exists and is allocated to your sessionk you can then write one or more members into it.
If this does not provide clarification, please advise.
It may be that i misunderstood your question. |
|
Back to top |
|
|
Rishi Khare
New User
Joined: 13 Aug 2007 Posts: 16 Location: Mumbai
|
|
|
|
this is what the code looks like
IF SYSDSN(FILENAME) /= "OK" THEN DO
ADDRESS "TSO" "ALLOC DD(DD) DS("FILENAME") NEW",
"DSORG(PO) RECFM(F M) LRECL(80) SPACE(10, 5) DIR(10) TRACKS"
END
IF SYSDSN("FILENAME(MMBR)") /= "OK" THEN DO
"ALLOC DS("FILENAME(MBR)") SHR FILE(DD2)"
END
IF RC=0 THEN DO
PUSH "RIDJFGHJLGJSDFLGHDFSHI"
"EXECIO 1 DISKW DD2"
END
"EXECIO 0 DISKR DD2 (FINIS" |
|
Back to top |
|
|
Rishi Khare
New User
Joined: 13 Aug 2007 Posts: 16 Location: Mumbai
|
|
|
|
throws this error at the time of writing the record in the member
IRX0250E System abend code 213, reason code 00000004.
IRX0255E Abend in host command EXECIO or address environment routine TSO.
IEA848I NO DUMP WAS PRODUCED FOR THIS ABEND, DUE TO SYSTEM OR INSTALLATION REQU
EST
IRX0670E EXECIO error while trying to GET or PUT a record. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Does it work ?
If not, please post the error message(s) |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Try this
Code: |
/* REXX *** Test pds allocation */
dsname = 'dataset name'
DSE = SYSDSN("'"strip(dsname)"'")
If DSE <> 'OK' then do
"FREE FI(Pdsout)"
"ALLOC FI(Pdsout) DA('"dsname"') new
tracks space(10 10) dir(44)
Recfm(F B) LRECL(80)"
End
"FREE FI(Pdsout)"
"ALLOC FI(Pdsout) DA('"dsname"(ABCDEF)') SHR"
push "TEST RECORD"
"EXECIO 1 DISKW Pdsout (FINIS"
"FREE FI(Pdsout)"
"ISPEXEC EDIT DATASET('"dsname"(ABCDEF)')"
Exit
|
|
|
Back to top |
|
|
|