COBOL程序,JCL作业,还是二者? [英] COBOL program, JCL job, or both?

查看:164
本文介绍了COBOL程序,JCL作业,还是二者?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须完成3个任务:

一个插入,一个删除和一个写



我不知道最好的方法做到这一点。我的大型机程序设计技巧并不太紧,所以我正在寻找建议。



我可以避免为此做一个COBOL程序吗?

我看到的方式,我只需要执行SQL语句的JCL。如果我正确地设计了我的陈述,那么他们应该能够以这种方式预设任务1和2。但我想我可能需要一个COBOL程序写入文件?



我将概述我的思考过程中的3个任务。每个任务似乎都是类似的,但是他们查询不同的结果,所以SQL语句是非常不同的。但是他们都在使用同一张表。



任务1:

-perform SQL查询

- 对于每行查询提取

- 根据该行插入一个新行



任务2:
-perform SQL查询

- 查询所接收的每一行

- - 删除记录



任务3:

-perform SQL查询

- 查询提取的每一行

- 将该记录写入文件

解决方案

你不能用JCL,JCL(大多数)执行这些任务只是使程序执行。为了完全准确,JES在解释JCL时执行这些功能。



现在,您可以通过使用现有实用程序或一组实用程序来避免编写程序。


$ b例如,$ b

SyncSort可以执行SELECT语句并将结果写入文件。



DSNTEP4可以批量执行SQL语句,包括DELETE,UPDATE和INSERT语句。



所以你可以这样做,而不用编写一个COBOL(或者汇编器,或PL / I,或者C / C ++或Rexx等)程序,只是不执行程序。


I have to preform 3 tasks:
an insert, a delete, and a write

I'm not sure what the best way to do this is. My mainframe program design skills aren't too tight, so I was looking for advice.

Could I avoid doing a COBOL program for this?
The way I see it, I just need JCL that executes SQL statements. If I design my statements correctly, then they should be able to preform tasks 1 and 2 this way. But I'm thinking I may need to have a COBOL program to write to a file?

I'll overview my thought process for the 3 tasks. Each task seems similar, but they query different results, so the SQL statements are very different. But they are all working with the same table.

Task 1:
-perform SQL query
-For each row that the query picks up
- -Insert a new row based on that row

Task 2: -perform SQL query
-For each row that the query picks up
- - delete the record

Task 3:
-perform SQL query
-For each row that the query picks up
- -Write that record to a file

解决方案

You cannot perform these tasks with just JCL, JCL (mostly) just causes programs to execute. To be completely accurate, JES performs these functions as it interprets JCL.

Now, you can avoid writing a program by using an existing utility or set of utilities.

SyncSort, for example, can execute a SELECT statement and write the results to a file.

DSNTEP4, for example, can execute SQL statements in batch that include DELETE, UPDATE, and INSERT statements.

So you could do this without writing a COBOL (or Assembler, or PL/I, or C/C++, or Rexx, etc.) program, just not without executing a program.

这篇关于COBOL程序,JCL作业,还是二者?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆