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

How to read DA organization file in REXX


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chandu85

New User


Joined: 13 May 2008
Posts: 5
Location: Bangalore,India.

PostPosted: Fri May 13, 2011 6:29 pm
Reply with quote

Hello All,

I am very new to REXX and I was going through some examples and understood that we use EXECIO function to read files, but this isn't working for a file I have which is having below specifications.


General Data Current Allocation
Management class . . : EXCLUDE Allocated cylinders : 350
Storage class . . . : DEVLPMNT Allocated extents . : 1
Volume serial . . . : DLV199
Device type . . . . : 3390
Data class . . . . . : **None**
Organization . . . : DA
Record format . . . : F
Record length . . . : 0
Block size . . . . : 13682
1st extent cylinders: 350
Secondary cylinders : 0 Dates
Data set name type : Creation date . . . : 2002/02/05
Referenced date . . : 2011/05/13
Expiration date . . : ***None***


Can anyone help me with function/process I need to use to open/read this file.


Regards,
Chandu.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri May 13, 2011 6:34 pm
Reply with quote

You might try to override the dsorg when allocating

see my post here how to read a PDS directory using EXCIO and check if the same approach can be used for a DA dataset

ibmmainframes.com/viewtopic.php?t=54492&highlight=
Back to top
View user's profile Send private message
chandu85

New User


Joined: 13 May 2008
Posts: 5
Location: Bangalore,India.

PostPosted: Fri May 13, 2011 7:12 pm
Reply with quote

Hi Enrico,

Thanks much for quick response.
Looks like PSORG is doing the job.

Will get back here if I need any further help.

Thanks,
Chandu
Back to top
View user's profile Send private message
chandu85

New User


Joined: 13 May 2008
Posts: 5
Location: Bangalore,India.

PostPosted: Mon May 16, 2011 5:03 pm
Reply with quote

Hi Enrico,

Now am facing a new problem.
I am trying to read a member from yesterday's DA file.

Below is the code I am using.
Code:

var1= BPXWDYN(,                                                           
 "ALLOC FI(R1HGIN) Dsn('PCT.SAVEONLI.SOURCE(XXXXXXXX)') SHR SUBSYS(LAM)",
 )                                                                       
say 'allocation status: ' var1                                           
if var1  <> 0 then                                                       
        say s99msg.0                                                     
        do I  = 1 until I = s99msg.0                                     
        SAY I   S99MSG.I                                                 
    END                                                                   
        exit 8                                                           

Below is the response I am getting
Code:

allocation status:  1996488815                                                       
2                                                                                     
1 IKJ56231I DATA SET PCT.SAVEONLI.SOURCE NOT ALLOCATED, SYSTEM OR INSTALLATION ERROR+
2 IKJ56231I DYNAMIC ALLOCATION REASON CODE IS X'00007700'                             


Any suggestions from your side in fixing this would be of great help.

Reference from this site related this issue.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Mon May 16, 2011 5:15 pm
Reply with quote

Code:
Dsn('PCT.SAVEONLI.SOURCE(XXXXXXXX)')

that' s not a DA file is a PDS...
Code:
... SUBSYS(LAM)",

accessed probably tru a subsystes

not a vanilla zOS dataset

review Your understanding of dataset organization and subsystem interfaces

usually, anyway, dataset accessed thru a <subsystem> interface are seen as plain PS files

also
Code:
  if var1  <> 0 then                                                       
        say s99msg.0                                                     
        do I  = 1 until I = s99msg.0                                     
        SAY I   S99MSG.I                                                 
    END                                                                   
        exit 8       


is not top programming icon_biggrin.gif

a better way would be

Code:
 
if  var1  <> 0 then do
    do  I  = 1 to s99msg.0                                     
        SAY I   S99MSG.I                                                 
    END                                                                   
    exit 8       
end
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Mon May 16, 2011 5:18 pm
Reply with quote

groups.google.com/group/bit.listserv.ibm-main/browse_thread/thread/69cdbec3b6897810
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


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

PostPosted: Mon May 16, 2011 5:22 pm
Reply with quote

What is this SUBSYS parameter intended to do? I am unfamiliar with it.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Mon May 16, 2011 5:26 pm
Reply with quote

ibmmainframes.com/about22451.html
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon May 16, 2011 5:54 pm
Reply with quote

SUBSYS=LAM (which is the invocation technique in JCL) is a method used by CA to allow a CA-LIBRARIAN master file to be read by system utilities as if it were a PDS (sorta).
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 -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top