Use OLQBATCH to create a flat file containing unformatted IDMS record

Document ID : KB000024951
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:

Is there a way to create a sequential file containing unformatted IDMS records using an OLQBATCH job?

Environment:

z/OS 

Answer:

An easy method of creating a sequential file containing unformatted IDMS records is to use the keyword "OUTPUT ddname" in your SELECT statement and assign that ddname to the target dataset in the JCL.

 

Using OLQBATCH, route the records selected to be written in their unformatted condition to a sequential file by using the OUTPUT keyword in the SELECT statement and assigning a DDNAME in the JCL pointing to the target data set.

For example:

 // OLQBatch JCL <...+....1....+....2....+....3....+....4....+....5. 
 ================================ T O P ============ 
 //OLQBATCH EXEC PGM=OLQBATCH,REGION=..       
 << olq jcl >> //OUTFILE DD DSN=output.outfile,DISP=SHR 
 //SYSIPT    DD * 
 SET DICTNAME APPLDICT 
 SET DBNAME EMPDEMO 
 SIGNON SS=EMPSS01 
 SELECT * FROM EMPLOYEE OUTPUT OUTFILE /* 
 ============================= B O T T O M ========= 

The data is written in its unformatted condition to the dataset specified in the OUTFILE DD.

The resulting output file will look like the following:

> OUTPUT.OUTFILE                                                          
<...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
==================================== T O P ====================================
0023KATHERINE O'HEARN        12 EAST SPEEN ST    NATICK         MA02364    61788
0329PHINEAS   FINN           79 HIGH ST          WESTON         MA04371    61749
0048NANCY     TERNER         14 TYPO TERR        READING        MA02317    61733
0371BETH      CLOUD          3456 PINKY LN       NATICK         MA02178    61743
0020JAMES     JACOBI         555 JAKAS DR        GROVER         MA02976    61733
0081TOM       FITZHUGH       450 THRUWAY ST      MANSFIELD      MA03458    61788
0049DOUGLAS   KAHALLY        56 SPELLING AVE     READING        MA02317    61733
0024JANE      DOUGH          15 LOCATION DR      NEWTON         MA02456    61744
0021RALPH     TYRO           888 FORTITHE ST     SINGER         MA02254    61744
0341RICHARD   MUNYON         17 BLACKHILL DR     WESTWOOD       MA02090    61732
0366ALAN      DONOVAN        6781 CORNWALL AVE   MELROSE        MA02176    61766
================================================================================

PLEASE NOTE: The access switch must be set to OLQ to read or write sequential files.

 

Additional Information:

Olq Reference Guide, Defining files

https://support.ca.com/cadocs/0/CA%20IDMS%2018%205%20User%20Bookshelf-ENU/Bookshelf_Files/HTML/IDMS_OLQ_Ref_ENU/index.htm