Question:

Converting GDG Datasets

by  |  earlier

0 LIKES UnLike

Greetings,

I have to convert a field in a number of datasets, all are GDGs. Two questions.

1.) How can I loop through the GDGs? Right now, my idea is to copy the GDGs to another GDG base, process the new base rewriting the datasets back to the old base. Seems to me I have to create job steps to copy & process each GDG member separately.

2.) The field I am converting is a PIC X(5) and I have to recreate it as a PIC S9(11) COMP-3. In some cases I think I am going to be able to use File-Aid but one set of these is more problematic. The field I am converting may contain values such as all spaces, "#", all digits, and digits followed by spaces. I have been able to scrub all spaces and "#" characters but the digits followed by spaces is causing me problems. Need I write a COBOL program to do this? Or shold File-Aid or Sort be able to handle this?

Thanks

 Tags:

   Report

1 ANSWERS


  1. I thought I responded to this already, but I would suggest creating a second GDG, and writing a quick COBOL or C program to do the copy/reformat.

    I do know stuff like this can be done in a script type language kicked off from the JCL though, as I did it some 20+ years ago.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.