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

Read Compile Listing


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

New User


Joined: 25 Feb 2006
Posts: 38
Location: chennai-india

PostPosted: Thu Jan 14, 2010 3:36 am
Reply with quote

Hi All,

When I try to read a compile listing using below CODE, it throws me a error message. Is there any way to get rid of it,

CODE:
Code:

/* REXX */                                     
ADDRESS TSO                                   
FNAME='listing dataset'           
"ALLOC DA("FNAME") F(MYlad) SHR REUSE"         
"EXECIO * DISKR MYlaD(STEM lad."               
load_switch_fnd = 'N'                         
DO I = 1 TO lad.0                             
  RESULT = FIND(lad.I,shan)             
  IF RESULT \= 0 THEN                         
    DO                                         
      load_switch_fnd = 'Y'                   
      SAY 'OUND'                               
    END                                       
END                                           


ERROR MESSAGE:
Code:

IRX0509E Invalid record format for data set allocated to file MYLAD. RECFM must be fixed or variable. Spanned records or records with track overflow are not supported.                                                               
IRX0670E EXECIO error while trying to GET or PUT a record.     
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jan 14, 2010 3:46 am
Reply with quote

Hello,

Look at the attributes of the file you are trying to read. If the dataset does not "follow the rules", copy it to another file with proper attributes.
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: Thu Jan 14, 2010 3:48 am
Reply with quote

What the record format for the data set?
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Jan 14, 2010 8:27 am
Reply with quote

Does it follow the rules for EXECIO?

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IKJ4A380/10.3?DT=20090601051930

Quote:

Restrictions: The EXECIO command does not support I/O on files allocated to data sets with spanned, track overflow, or undefined record formats.

An I/O data set must be either sequential or a single member of a PDS. Before the EXECIO command can perform I/O to or from the data set, the data set must be allocated to a file that is specified on the EXECIO command. The EXECIO command does not perform the allocation.
Back to top
View user's profile Send private message
som_infotech

New User


Joined: 25 Feb 2006
Posts: 38
Location: chennai-india

PostPosted: Thu Jan 14, 2010 9:21 am
Reply with quote

Yes I know its not following the rules, but I want it to happen. I want some way to read that file. It cant be copied to a FB file.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jan 14, 2010 10:15 am
Reply with quote

talking to some members of this forum is like pounding sand.

there is nothing that you can do to the execio statement to read a file that is not acceptable under current documented restrictions.

you could call an assembler/cobol module that can read the file and return each record
or create a new FB file and have the rexx allocate and read.

why can't you reformat the file?

and again - what is this file, the type,organization?
your refusal to answer this question is reflects on your maturity and professionalism
when confronted with facts.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jan 14, 2010 10:30 am
Reply with quote

edited the last post so many times in an effort to follow all the PC BS
that I still have a grammatical error in the last sentence.

you say compile listing. At this point I imagine that it is part of a resource management database (e.g., endevor)
but an original compile listing is a 133 char fba file, which can be read by execio.

If you insist on using your little rexx tool to process this file, you are going to have reformat the file for the execio to function.

and nobody can tell you how to accomplish this until you give up your secret.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Jan 14, 2010 2:31 pm
Reply with quote

Quote:
Yes I know its not following the rules, but I want it to happen


looks like You are just wasting everybody' s time.
good luck anyway, given this attitude You might need lots of it
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jan 14, 2010 8:28 pm
Reply with quote

Hello,

Quote:
but I want it to happen.
You can't always get what you want.
-Mick Jagger, Rolling Stones

Quote:
I want some way to read that file
Ah, get out of rexx/execio . . .

Quote:
It cant be copied to a FB file.
Yes, it can. At least it can on every system i have access to. . . Is the reason it "cant be copied" simply because you don't want to? If yes, re-read first item in this reply. . .

Quote:
looks like You are just wasting everybody' s time.
Good thing this is the "expert" forum. . .
Back to top
View user's profile Send private message
som_infotech

New User


Joined: 25 Feb 2006
Posts: 38
Location: chennai-india

PostPosted: Thu Jan 14, 2010 9:40 pm
Reply with quote

Thanks everyone..!!

Sorry I was in a diff timezone so was not able to reply soon.

Actually I am creating a tool - for verifying the components after its installed to prodcution i.e comparing the change man package component with the production component. I was able to accomplish everything and its working good for all comp types - SRO, SRB, PRC, JCL etc. But the comparison fails for listing i.e LSO & LST. So I thought I can read the file and verify whether a particular detail is available in the file. But it failed for "IRX0509E" error. Thats I I raised a question in this forum whether we have any other way to accomplish it.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jan 14, 2010 10:10 pm
Reply with quote

Hello,

Quote:
whether we have any other way to accomplish it.
I believe the only way to do this with execio is to get the data into an acceptable format. . .
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Jan 14, 2010 10:17 pm
Reply with quote

Quote:
IRX0509E Invalid record format for data set allocated to file MYLAD. RECFM must be fixed or variable. Spanned records


spanned records are used when the record length is greater than the block size...
any reason for a SYSPRINT alike dataset to be allocated with the spanned DCB attribute ??

speak to Your support about the CM customization and about changing the DCB specifications

as far as I can remember the only datasets that have to be allocated with the spanned attribute are the SMF dump datasets,
even if frankly I have never had the chance of seeing one in the zillions of smf dumps I have processed (*)


(*) not by me, but by applications and utilities I developed icon_biggrin.gif
Back to top
View user's profile Send private message
som_infotech

New User


Joined: 25 Feb 2006
Posts: 38
Location: chennai-india

PostPosted: Sat Jan 16, 2010 3:19 am
Reply with quote

Finally I got it done,

Without opening the file we can search the file using below method,

[code]
ADDRESS TSO
dsname = dsnname
RetRC = 0
"ALLOC FILE(SYSIN) UNIT(SYSALLDA) NEW TRACKS SPACE(1,1) DELETE",
" REUSE LRECL(80) RECFM(F B) BLKSIZE(3120)"
QUEUE "LNCT 999999" /* Line count */
"EXECIO 1 DISKW SYSIN "
QUEUE "SRCHFOR '"som"'" /* Search string */
"EXECIO 1 DISKW SYSIN (FINIS"
"ALLOC FI(OUTDD) DA(*)"
"ALLOC DA('"DSName"') FI(NEWDD) SHR REU"
SeqRC = RC
IF SeqRC /= 0 THEN DO
SAY 'File' DSName 'could not be allocated for search'
SAY 'Return code =' SeqRC
RETURN
END
ADDRESS ISPEXEC "SELECT PGM(ISRSUPC)" ,
"PARM(SRCHCMP,ANYC,NOSUMS,LMTO)"
SearchRC = RC
IF SearchRC = 0 THEN
SAY Line 'No matches'
ELSE IF SearchRC = 1 THEN
SAY Line 'Data found'
ELSE NOP
[code]
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Jan 16, 2010 4:02 am
Reply with quote

Hello,

Quote:
Without opening the file we can search the file using below method,
Yup, by letting some other code open it icon_cool.gif

Good to hear it is working - thanks for posting your solution icon_smile.gif

d
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Sun Jan 17, 2010 12:51 am
Reply with quote

som_infotech wrote:
comparing the change man package component with the production component.
Maybe I missed something.
Why do you need to compare the compile listing, if you can compare the source code???
Also, the original piece of REXX code seems to have nothing to do with a comparison. How so?
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 Error to read log with rexx CLIST & REXX 11
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Random read in ESDS file by using RBA JCL & VSAM 6
No new posts C Compile time time stamps Java & MQSeries 10
This topic is locked: you cannot edit posts or make replies. How To Write, Compile and Execute Cob... COBOL Programming 5
Search our Forums:

Back to Top