×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Here it is. Upload the program, compile it as CBL and run it. WrkSplf will
give you: 
Opz  File        Uten        coda        Dati ut.
     QPRINT      SVFINUCCI   PRT01       ItIsA   
     QPRINT      SVFINUCCI   PRT01       ItIsB   
     QPRINT      SVFINUCCI   PRT01       ItIsC   
     QPRINT      SVFINUCCI   PRT01       ItIsD   
Program source: 
       PROCESS DATETIME
       IDENTIFICATION DIVISION.
       PROGRAM-ID. UPRTF.
      * ----------------------------------------------------------------
      * Example of OVRPRTF via QcmdExc   (DF, 11/09/2003) 
      * ----------------------------------------------------------------
       ENVIRONMENT DIVISION.
       CONFIGURATION       SECTION.
       SPECIAL-NAMES. OPEN-FEEDBACK IS OFA
                      I-O-FEEDBACK IS IOFA
                      DECIMAL-POINT IS COMMA.
      *
       INPUT-OUTPUT SECTION.
       FILE-CONTROL.

           SELECT  Stampa
                   ASSIGN       TO PRINTER-QPRINT
                   ACCESS       IS SEQUENTIAL
                   ORGANIZATION IS SEQUENTIAL
                   FILE STATUS  IS fs-stampa .
      *================================================================
       DATA DIVISION.
       FILE SECTION.
       FD  Stampa.
       01  Riga-stampa pic x(132).
      *================================================================
       WORKING-STORAGE SECTION.
       01 file-status.
           03  fs-stampa         PIC xx            VALUE ZERO.
              88 fs-stampa-ok                      value '00' '41'.
      *---------------------------------------------------------
       01 W-MEMORY.
          03 w-comando                    pic X(80).
          03 w-comando-len                 PIC S9(10)V9(5) comp-3.
          03 LIST    pic x(10) value "ABCDEFGHIJ".
          03 I       pic 9(1)  VALUE ZERO.
      ** ----------------------
       LINKAGE SECTION.
       PROCEDURE DIVISION.
       MAIN.
           PERFORM VARYING I FROM 1 BY 1 UNTIL I > 4
              perform ovrprtf
              open output stampa
              string  "Riga di stampa " list(i:1)
              delimited by size into riga-stampa
              perform scrivi
              close stampa
              perform dltovr
           end-perform.
           GOBACK.
      ** --------------------------------------------------
       ovrprtf.
      **    OVRPRTF FILE(QPRINT) TOFILE(QPRINT) USRDTA('xxx')
           string "OVRPRTF FILE(QPRINT) TOFILE(QPRINT) USRDTA('ItIs"
              list(i:1)   "')"
           delimited by size into w-comando
           move 51 to w-comando-len
           call "QCMDEXC" using w-comando w-comando-len.
       ovrdbf-ex. exit.
      ** --------------------------------------------------
       dltovr.
           string "DLTOVR FILE(*ALL)"
           delimited by size into w-comando
           move 17 to w-comando-len
           call "QCMDEXC" using w-comando w-comando-len.
       dltovr-ex. exit.
      ** --------------------------------------------------
       scrivi.
           write riga-stampa end-write .
           initialize riga-stampa.
       scrivi-ex. exit.
      ** --------------------------------------------------

Sincerely
Domenico Finucci
Fiditalia , Milano, 02- 4301-2494


-----Messaggio originale-----
Da: geir.kildal@xxxxxxxxxxxxxx [mailto:geir.kildal@xxxxxxxxxxxxxx]
Inviato: giovedì 11 settembre 2003 15.04
A: COBOL Programming on the iSeries/AS400
Oggetto: Re: R: Changing USRDTA on printfiles on the run...


Finucci:

Thanks for your answer, but I do need more details.  The definition of the 
printfile in the cobol-pgm is:  SELECT PRTFA         ASSIGN TO 
FORMATFILE-PRTFA. 

The CL-commands that does not work are: OVRPRTF    FILE(PRTFA) 
USRDTA(&USRDTA) , OVRPRTF    FILE(*PRTF) USRDTA(&USRDTA) .  I have tried 
them both.

How do I use qcmdexc from an OPM-COBOL-pgm?  Do you have an example?


Thanks

Geir 

 
_______________________________________________
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing list
To post a message email: COBOL400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-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-2026 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.