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
 
Running File Manager from a Clist

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

New User


Joined: 06 Jun 2005
Posts: 3

PostPosted: Mon Jun 06, 2005 10:26 pm    Post subject: Running File Manager from a Clist
Reply with quote

I'm running the following Clist, but for some reason it is not working as desired. It is not performing the Do While even though FILERC is equal Zero. I added messages before and after the loop and it displays only those before but not those into the loop. Any idea?
:
:
//JS010 EXEC PGM=FMN1IMSB,
// COND=(8,LE)
//SYSPRINT DD DSN=&OUTFILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(10796,(300,60),RLSE),
// DCB=(RECFM=FBA,LRECL=133,BLKSIZE=0)
//FMNTSPRT DD SYSOUT=*
//ISPSLIB DD DSN=SYS2.TSO.ISPSLIB,DISP=SHR
//SYSTERM DD SYSOUT=*
//FMIMSIN DD *
$$FILEM IEB REGNTYPE=BMP,
$$FILEM AGN=IMS&ENV1.&AGN,
$$FILEM PSBTYPE=STATIC,
$$FILEM PSBDSN=&PL1,
$$FILEM PSBMEM=&ENV2.DVANGD,
$$FILEM DBDDSN=&DL1,
$$FILEM DBDMEM=&ENV2.DS21P0,
$$FILEM IMSID=IM&ENV1,
$$FILEM IMSOBA=100,
$$FILEM IMSNBA=10,
$$FILEM PROC=*
/* DEFINE TEMPLATE DSN */
VIEWIMS('TPLDSN=&FM ')
/* LIST SEGMENT DS21 */
FILERC = GETIMS('SEGMENT=DS21 ')
DO WHILE FILERC = 0
NUMRD = NUMRD + 1
IF SUBSTR(INREC,3,10) = '0000000&BR ' THEN
DO
PRINT(INREC,SNGL)
END
FILERC = GETIMS('SEGMENT=DS21 NEXT')
END
Back to top
View user's profile Send private message
References
PostPosted: Mon Jun 06, 2005 10:26 pm    Post subject: Re: Running File Manager from a Clist Reply with quote

grepusr3

New User


Joined: 10 May 2005
Posts: 35

PostPosted: Tue Jun 07, 2005 12:58 pm    Post subject: Re: Running File Manager from a Clist
Reply with quote

gdelmoral,

It seems from above, you have JCL embedded in your input stream, like '/*' in column 1 and 2 (end of cardlist input). They appear to be comments, but to OS they are JCL characters. If JCL , then use
//ddname DD DATA,DLM=@@
--- where '@@' is two characters delimiter of your choice in columns 1 and 2 like below
@@


Code:
//FMIMSIN DD DATA,DLM=@@
$$FILEM IEB REGNTYPE=BMP,
$$FILEM AGN=IMS&ENV1.&AGN,
$$FILEM PSBTYPE=STATIC,
$$FILEM PSBDSN=&PL1,
$$FILEM PSBMEM=&ENV2.DVANGD,
$$FILEM DBDDSN=&DL1,
$$FILEM DBDMEM=&ENV2.DS21P0,
$$FILEM IMSID=IM&ENV1,
$$FILEM IMSOBA=100,
$$FILEM IMSNBA=10,
$$FILEM PROC=*
/* DEFINE TEMPLATE DSN */
VIEWIMS('TPLDSN=&FM ')
/* LIST SEGMENT DS21 */
FILERC = GETIMS('SEGMENT=DS21 ')
DO WHILE FILERC = 0
NUMRD = NUMRD + 1
IF SUBSTR(INREC,3,10) = '0000000&BR ' THEN
DO
PRINT(INREC,SNGL)
END
FILERC = GETIMS('SEGMENT=DS21 NEXT')
END
@@


-Pelad
Back to top
View user's profile Send private message
gdelmoral

New User


Joined: 06 Jun 2005
Posts: 3

PostPosted: Tue Jun 07, 2005 7:39 pm    Post subject: Re: Running File Manager from a Clist
Reply with quote

Thanks for your reply. The DLM parm didn't work. I used "##" because I'm using "@@" to end the JCL. See the complete Clist in the attachment below. Thanks in advance.
Back to top
View user's profile Send private message
grepusr3

New User


Joined: 10 May 2005
Posts: 35

PostPosted: Tue Jun 07, 2005 11:51 pm    Post subject: Re: Running File Manager from a Clist
Reply with quote

gdelmoral,

Just to be on the safe side of definitive clist syantax, please try using & (ampersand) with the variable and see if it works.


DO WHILE (&FILERC = 0)

-Pelad
Back to top
View user's profile Send private message
gdelmoral

New User


Joined: 06 Jun 2005
Posts: 3

PostPosted: Wed Jun 08, 2005 1:11 am    Post subject: Re: Running File Manager from a Clist
Reply with quote

Same thing using &FILERC. The counters are not incremented, so, the job is not getting into the loop...I created a JCL with the same logic but without using the Clist and it runs successfully (the last return code is EOF and there are records read and found).

REXX procedure statements processed by REXX.
IBM File Manager for z/OS IMS Component
DS21 LAST RETURN CODE: 0
DS21 RECORDS READ 0
DS21 RECORDS FOUND: 0
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