Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: to find all definition of pIC clause of 9(10) & change 9
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: 8593
Location: Back in jolly old England

PostPosted: Tue Apr 01, 2008 4:10 pm    Post subject:
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: 756
Location: Germany

PostPosted: Tue Apr 01, 2008 4:13 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Apr 01, 2008 5:33 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Apr 01, 2008 7:47 pm    Post subject:
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    Post subject: Reply to: to find all definition of pIC clause of 9(10) &
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    Post subject:
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    Post subject: How to route to a dataset
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    Post subject: How to route to a dataset
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts How to see VIEW definition from BMC c... rohanthengal DB2 1 Thu May 04, 2017 1:50 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us