Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting files with multiple records to one record files

Status
Not open for further replies.

tubastew

Programmer
Jan 31, 2001
3
0
0
US
I (we) are in a project that will generate a .PDF file and FTP the document to a web server. When run on-line, every thing works just fine because we are posting just one record at a time. However, when done in batch, multiple records will be generated in a single file. What would be the best way to split the individual records out and have each changed to .PDF and posted to the web as individual documents? Can this be done using COBOL and JCL?
 
Another, probably easier way, to handle this is have your JCL define the output file as a GDG (generation data group). This way, you don't have to touch the COBOL because each new occurrance of the file name is save automatically in a new version or 'generation'. Then JCL can FTP your files by accessing the individual versions of the same file name...
 
An other way to handle this is to call TSO with a command to send your file away. So in COBOL you write your file, you close it and then you do something like:

CALL 'IKJEFT01' USING TSO-COMMAND.

The TSO-COMMAND must probably be something like:

01 TSO-COMMAND.
03 TC-LENGTH PIC S9(4) COMP VALUE ....
03 TC-TEXT PIC X(...) VALUE '....'

This way you can give only one command. But it is also possible to do the call and let TSO use its terminal input and output.

After that, you just open your file again for output, repeating the whole procedure.

There are other names for IKJEFT01 in the language environment. You can find them in the manuals.

It is also possible to write a job into the internal reader. You can assign a file with something like (intrdr,..) I don't know the right expression without looking into the manuals but this is the idea.

I hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top