Running File Manager batch functions with a CICS® resource

When you run a File Manager batch function with a CICS® resource, you must specify the resource type, VTAM® applid of the CICS® system, and the name of the CICS® resource. You cannot specify generic values. See Specifying a CICS resource.

Table 1 shows you the File Manager batch functions you can use with CICS® resources.
When you run File Manager batch functions with a CICS® resource, be aware that:
  • If you are specifying a batch keyword for a CICS® TS queue that contains special or lowercase characters, or a CICS® TD queue that contains lowercase characters, you must enclose the name of the resource in quotation marks like this:
    c'rt:applid:rname'
    Any single quotation mark in the resource name must be repeated. For example, to specify the TS queue name 'quoted name', enter:
    DSNIN=c'TS:MYCICS:''quoted name'''
  • For DSG and DSC functions:
    • The DISP=MOD parameter appends to the TD (transient data) and TS (temporary storage) queues. Records are always appended for CICS® files.
    • The DISP=OLD parameter replaces the TD (transient data) and TS (temporary storage) queues. This is ignored for CICS® files where the data is always appended

Shown here are some examples of running File Manager batch functions with a CICS® resource.

Example 1: Data set Generate: Creating a TS queue using a template
$$FILEM DSG DSNOUT=TS:PRODCICS:MYTSQ
$$FILEM RECSIZE=2000,
$$FILEM DISP=OLD,
$$FILEM TCOUT=MY.TEMPLATE.DSN(MYTP),
$$FILEM NLRECS=100
Example 2: Data Set Copy: Copying a flat file to a CICS® intrapartition TD queue
$$FILEM DSC DSNIN=MYHLQ.QUEUE.DATA,
$$FILEM DSNOUT=TD:PRODCICS:MYIQ
Example 3: Data Set Print: Printing a CICS® file using a template
$$FILEM DSP FORMAT=TABL,
$$FILEM TCIN=MY.TEMPLATE.DSN(MYTP),
$$FILEM DSNIN=FI:PRODCICS:MYKSDS
Example 4: Find/Change: Making changes to a CICS® file
$$FILEM FCH ,
$$FILEM DSNIN=FI:PRODCICS:MYKSDS
CAPS ON
C 'ABC' 'DEF' 12 14
/+
Example 5: Data Set Edit Batch: Navigating a CICS® file backwards and changing a name
$$FILEM DSEB DSNIN=FI:PRODCICS:MYKSDS,PROC=*
BOT()
DO UNTIL(UP(1) = 'TOF')
  IF FLDI(3,'=','JOHN') THEN DO
    OVLY_OUT('BILL',3)
    UPDATE()
    LEAVE
  END
END
/+
Example 6: Data Set Copy: Copying a flat file into a temporary storage queue
$$FILEM DSC DSNIN=myhlq.flatfile,
$$FILEM DSNOUT=TS:TESTCICS:MYTSQ
Example 7: Data Set Compare: Comparing two files on different CICS® systems
$$FILEM DSCMP TYPE=RECORD,
$$FILEM SYNCH=ONETOONE,
$$FILEM LIST=DELTA,
$$FILEM WIDE=YES,HILIGHT=YES,
$$FILEM DSNOLD=FI:PRODCICS:MYKSDS,
$$FILEM DSNNEW=FI:TESTCICS:MYKSDS