× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



If this isn't an ongoing job, you could store the counter in a Data area
and access it and increment it when needed. Like this

PGM &FILECOUNT

DCL &FILENAME *CHAR 10 'AB        '
DCL &COUNTER *DEC (3 0) 1

retry:
alcobj obj(*libl/counter *dtaara *excl)
monmsg msgid(Cpf1002) exec(do)
  dlyjob dly(10)
  goto retry
enddo

rtvdtaara dtaara(*libl/counter) rtnvar(&counter)

CHGVAR (%SST(&FILENAME 3 3)) &COUNTER
CRTPF LIBNAME/&FILENAME etc.
CHGVAR &COUNTER (&COUNTER + 1)
CHGDTAARA DTAARA(*libl/counter) value(&counter)

dlcobj  obj(*libl/counter *dtaara *excl)

ENDPGM


Thanks,

Mark


Mark Walter
Sr. Programmer/Analyst
Hanover Wire Cloth a div of CCX, Inc.
mwalter@hanoverwire.com
http://www.hanoverwire.com
717.637.3795 Ext.3040
/"\
\ /
 X
/ \



|--------+------------------------------------>
|        |          Vern Hamberg              |
|        |          <vhamberg@centerfieldtechn|
|        |          ology.com>                |
|        |          Sent by:                  |
|        |          midrange-l-bounces@midrang|
|        |          e.com                     |
|        |                                    |
|        |                                    |
|        |          01/28/2003 08:52 AM       |
|        |          Please respond to Midrange|
|        |          Systems Technical         |
|        |          Discussion                |
|        |                                    |
|--------+------------------------------------>
  
>-----------------------------------------------------------------------------------------------------------|
  |                                                                             
                              |
  |       To:     Midrange Systems Technical Discussion 
<midrange-l@midrange.com>                             |
  |       cc:                                                                   
                              |
  |       Subject:     Re: How to create Series of PF                           
                              |
  
>-----------------------------------------------------------------------------------------------------------|




Manoj, looks like you want a sequential name generator. No such thing, but
easy to write.

PGM &FILECOUNT

DCL &FILENAME *CHAR 10 'AB        '
DCL &COUNTER *DEC (3 0) 1
DCL &FILECOUNT *DEC (3 0)

START:
CHGVAR (%SST(&FILENAME 3 3)) &COUNTER
CRTPF LIBNAME/&FILENAME etc.
CHGVAR &COUNTER (&COUNTER + 1)
IF (&COUNTER *LE &FILECOUNT) DO
GOTO START
ENDDO
ENDPGM

I put that together from home - don't remember if leading zeroes get put in

with CHGVAR, so check this.

HTH

Vern

At 11:00 AM 1/28/2003 +0530, you wrote:
>Hi  All,
>  How do we create a series of PF say starting  "AB1", "AB2" , ........
and
>So on.
>Is there any command for this. Can we do the same with PF members?
>Thank & regards
>Manoj


_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo.cgi/midrange-l
or email: MIDRANGE-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.






As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.