Is there a way to create a sequential file containing unformatted IDMS records using an OLQBATCH job?
Release: All supported releases.
Component: OLQ.
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 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
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:
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.