Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
REXX issue

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
Author Message
chynna_v

New User


Joined: 22 Apr 2005
Posts: 6

PostPosted: Fri May 13, 2005 1:20 pm    Post subject: REXX issue
Reply with quote

I'm currently working on a converter code.

what im trying to do is to fix the relative position of a JCL control card assuming that the restart parameter is the last one in the job deck to be converted. For ex.

JOB123 JOB (x,xxxx,XX1234),
CLEANSHEET.PROD,
CLASS=Q,
MSGLEVEL=(1,1),
MSGCLASS=L,
USER=XXXXX,
RESTART=xxxxxxxx.xxxxx

the part of the converter code is

*converter code*

ISREDIT FIND ALL 'RESTART='
SET &CCLAST = &LASTCC
IF (&CCLAST = 0) THEN DO
ISREDIT LINE_AFTER .ZCSR = "//* "
ISREDIT LINE_AFTER .ZCSR = "&JL4"
ISREDIT LINE_AFTER .ZCSR = "&JL3"
ISREDIT LINE_AFTER .ZCSR = "//* "
ISREDIT LINE_AFTER .ZCSR = "&JL2A"
ISREDIT LINE_AFTER .ZCSR = "//* "
ISREDIT LINE_BEFORE .ZCSR = "&JL1"
ISREDIT LINE_BEFORE .ZCSR = "&JL2.,"
ISREDIT FIND ALL ','
END
ELSE DO /* if there is no RESTART parameter found*/
ISREDIT LINE_BEFORE .ZCSR = "&JL1"
ISREDIT LINE_BEFORE .ZCSR = "&JL2"
ISREDIT LINE_BEFORE .ZCSR = "//* "
ISREDIT LINE_BEFORE .ZCSR = "&JL2A"
ISREDIT LINE_BEFORE .ZCSR = "//* "
ISREDIT LINE_BEFORE .ZCSR = "&JL3"
ISREDIT LINE_BEFORE .ZCSR = "&JL4"
ISREDIT LINE_BEFORE .ZCSR = "//* "
END

after converting the results will be...

//*
/*JOBPARM S=200D
//*
//** DATE: CREATED BY:
//** FROM: USER:
//*
//JOB123 JOB (X,Xxxx,XX1234),CLNSHEET,MSGLEVEL=(1,1),
//CLASS=Q,MSGCLASS=L,NOTIFY=&SYSUID,USER=XXXXX,
// RESTART=xxxxxxxx.xxxxx

The problem occurs when there are several JCL that have this format

JOB123 JOB (x,xxxx,xx1234),
CLEANSHEET.PROD,
CLASS=Q,
RESTART=xxxxx.xxxxx,
MSGLEVEL=(1,1),
MSGCLASS=L

The above code (converter code) will produce RESTART with a ",". Since the restart line already has a comma.

//*
/*JOBPARM S=200D
//*
//** DATE: CREATED BY:
//** FROM: USER:
//*
//JOB123 JOB (X,Xxxx,XX1234),CLNSHEET,MSGLEVEL=(1,1),
//CLASS=Q,MSGCLASS=L,NOTIFY=&SYSUID,USER=XXXXX,
// RESTART=xxxxxxxx.xxxxx,

causing a JCL error.

I was thinking to add a line in the code whose function is to check whether or not the last RESTART line has a comma or not, but im still trying to implement it. In the meantime can you please give other suggestions? Thanks!
Back to top
View user's profile Send private message
References
PostPosted: Fri May 13, 2005 1:20 pm    Post subject: Re: REXX issue Reply with quote

chynna_v

New User


Joined: 22 Apr 2005
Posts: 6

PostPosted: Fri May 13, 2005 2:43 pm    Post subject:
Reply with quote

correction
there should be no
"ISREDIT FIND ALL ',' " before END

corrected converter code:

ISREDIT FIND ALL 'RESTART='
SET &CCLAST = &LASTCC
IF (&CCLAST = 0) THEN DO
ISREDIT LINE_AFTER .ZCSR = "//* "
ISREDIT LINE_AFTER .ZCSR = "&JL4"
ISREDIT LINE_AFTER .ZCSR = "&JL3"
ISREDIT LINE_AFTER .ZCSR = "//* "
ISREDIT LINE_AFTER .ZCSR = "&JL2A"
ISREDIT LINE_AFTER .ZCSR = "//* "
ISREDIT LINE_BEFORE .ZCSR = "&JL1"
ISREDIT LINE_BEFORE .ZCSR = "&JL2.,"

END
ELSE DO /* if there is no RESTART parameter found*/
ISREDIT LINE_BEFORE .ZCSR = "&JL1"
ISREDIT LINE_BEFORE .ZCSR = "&JL2"
ISREDIT LINE_BEFORE .ZCSR = "//* "
ISREDIT LINE_BEFORE .ZCSR = "&JL2A"
ISREDIT LINE_BEFORE .ZCSR = "//* "
ISREDIT LINE_BEFORE .ZCSR = "&JL3"
ISREDIT LINE_BEFORE .ZCSR = "&JL4"
ISREDIT LINE_BEFORE .ZCSR = "//* "
END
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1