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

to find all definition of pIC clause of 9(10) & change 9


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
thirumalaisamy
Currently Banned

New User


Joined: 24 Mar 2008
Posts: 7
Location: india

PostPosted: Tue Apr 01, 2008 12:55 pm
Reply with quote

Hi all,

I want to open a PS dataset which contains the PDS member name
Use the member and open the member in the another PDS dataset
find all pic9(10) and change it to 9(12)
and route the result to another datatset.

How Could I code it in Rexx.Anyone please help me out.

ADDRESS TSO
ADDRESS ISREDIT
"MACRO"
"NUM ON STD COB"
"UNNUM"
"RESET"
"ALLOC FI(INFIL) DA('SAMPLE.DSET') SHR REU'
'EXECIO * DISKR INFIL (STEM INREC. FINIS'

if RC = 0 then
DO I = 1 TO INREC.0
PGM = STRIP(INREC.I)
SAY ''PGM''
CALL RQSTDSET
IF RC /= 0 then
say 'ERROR:SOURCE PROGRAM "INREC.I" NOT FOUND '
EXIT
END

else
say 'THE FILE HAS NOT BEEN READ'
EXIT
"FREE F(INFIL)"


when i gave this its going to Else part ''THE FILE HAS NOT BEEN READ' .Please help me out in this too.Its also saying bad arthmetic conversion in DO I = 1 TO INREC.0 .
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Apr 01, 2008 4:10 pm
Reply with quote

Have you tried running with a TRACE ?
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Tue Apr 01, 2008 4:13 pm
Reply with quote

Hi !

I fully agree with expat !

Also have a look at your piece of code. You have one IF, then DO and another IF statement. But i could see only END statement once.

Regards, UmeySan
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Apr 01, 2008 5:33 pm
Reply with quote

I would probably use something like
Code:

"ALLOC FI(INFIL) DA('SAMPLE.DSET') SHR REU'
'EXECIO * DISKR INFIL (STEM INREC. FINIS'
If RC = 0 then
  DO I = 1 TO INREC.0
    PGM = STRIP(INREC.I)
    "Ispexec edit
       dataset('dataset name(PGM)')
       MACRO(macro)"
    If RC <> 0
       Then say something
END
"FREE F(INFIL)"
EXIT
Back to top
View user's profile Send private message
thirumalaisamy
Currently Banned

New User


Joined: 24 Mar 2008
Posts: 7
Location: india

PostPosted: Tue Apr 01, 2008 6:52 pm
Reply with quote

Thanks Expat.

Now I have another doubt such that I have pointed my cursor in a partcular line

Say line 20

Now I have read the line 20 into a Variable

I want to delete the line or insert two blank lines above the line 20


For Eg: The input is

Line 18 ABC
line 19 DEF
Line 20 Content


Output should be:

Line 16 ABC
Line 17 DEF
Line 18 **** COMMENT
LINE 19*
Line 20 *COntent
line 21 CONTENt
line 22 *
line 23****Comment

How Could i achieve that
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Apr 01, 2008 7:47 pm
Reply with quote

INSERT BEFORE
INSERT AFTER

Take a look at the ISPF edit macro book, or search the forum, as I have posted some examples in the last few weeks.
Back to top
View user's profile Send private message
thirumalaisamy
Currently Banned

New User


Joined: 24 Mar 2008
Posts: 7
Location: india

PostPosted: Wed Apr 02, 2008 6:30 pm
Reply with quote

Thanks Expat.

Now I have a new doubt

I have a function

In that function I am calling macro

RQSTDSET:
DSNNAME = APPOFSDC.DEV.KAR.PDS.NEW
DSET.I = DSNNAME || '(' || PGM ||')'

DSET.I = "'" || DSET.I || "'"

ADDRESS ISPEXEC
"EDIT DATASET("DSET.I") MACRO(FIRE1)"

"EXECIO" outrec "DISKW TEMP ( STEM pgmlines. FINIS"
"FREE F(OUTFIL)"

After that I am writing the result from the macro into the output file.But its saying EXECIO not supported


Should i pass the variables pgmlines and outrec to the macro.If So HOW?
Back to top
View user's profile Send private message
thirumalaisamy
Currently Banned

New User


Joined: 24 Mar 2008
Posts: 7
Location: india

PostPosted: Wed Apr 02, 2008 7:06 pm
Reply with quote

i am getting an error of

ISPF Dialog Error
Command ===>
More: +
******************************************************************************
* ISPS102 *
* *
* Invalid service name *
* 'ALLOC' is not a recognized dialog service name. *
* *
* *
* *
* *
* *
* *
* Current dialog statement: *
* ALLOC FI(OUTFIL) DA('APPOFSDC.DEV.OUTPUT.DATASET') MOD REUSE *
* *
* Enter HELP command for further information regarding this error. *
* Press ENTER key to terminate the dialog. *
* *
* / Override termination and attempt to continue? (/ = Yes) *
* *
Back to top
View user's profile Send private message
thirumalaisamy
Currently Banned

New User


Joined: 24 Mar 2008
Posts: 7
Location: india

PostPosted: Wed Apr 02, 2008 10:40 pm
Reply with quote

Hello Expat.

I have a subroutine

I am calling a macro from the subroutine

The MAcro reads a line from the application program and changes the format of the line

Now I need to route the changes(ie the changed line) to the output dataset.The dataset is opened in the Subroutine.

How could i achieve this.Please help ASAP.

GImme me some tips and sample code
Back to top
View user's profile Send private message
thirumalaisamy
Currently Banned

New User


Joined: 24 Mar 2008
Posts: 7
Location: india

PostPosted: Thu Apr 03, 2008 8:37 am
Reply with quote

Please someone help me out in this
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts 3270 personal communications. Can't c... TSO/ISPF 2
No new posts SELECT from data change table DB2 5
No new posts To search DB2 table based on Conditio... DB2 1
Search our Forums:

Back to Top