|
|
| Author |
Message |
gdelmoral
New User
Joined: 06 Jun 2005 Posts: 3
|
|
|
|
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 |
|
 |
References
|
Posted: Mon Jun 06, 2005 10:26 pm Post subject: Re: Running File Manager from a Clist |
 |
|
|
 |
grepusr3
New User
Joined: 10 May 2005 Posts: 35
|
|
|
|
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 |
|
 |
gdelmoral
New User
Joined: 06 Jun 2005 Posts: 3
|
|
|
|
| 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 |
|
 |
grepusr3
New User
Joined: 10 May 2005 Posts: 35
|
|
|
|
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 |
|
 |
gdelmoral
New User
Joined: 06 Jun 2005 Posts: 3
|
|
|
|
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 |
|
 |
|
|
|