Use a Variable for a File-Name

Is it possible Visual COBOL Personal to use a variable for the 'assign to' name.

I am working on a project that I need to split a file in about 100 different files for delivery. And DO NOT want to create 100 Selects and FD's.

 

Is this possible?

Parents
  • Off course, you can assign to ws-variable where ws-variable has the file-name.

    ex.

    SELECT FINV-ACLIN    ASSIGN TO WS-NAME-FISIC

    ...

    ...

    move "MY-FILE-NAME.DAT" TO WS-NAME-FISIC

     

    the other thing that could be useful is to use (prefix) on FD to maximize re-usability through several programs.

    Look the micro Focus Book demo or AirPortDemo for examples in your instalation.

    regards, 

Reply
  • Off course, you can assign to ws-variable where ws-variable has the file-name.

    ex.

    SELECT FINV-ACLIN    ASSIGN TO WS-NAME-FISIC

    ...

    ...

    move "MY-FILE-NAME.DAT" TO WS-NAME-FISIC

     

    the other thing that could be useful is to use (prefix) on FD to maximize re-usability through several programs.

    Look the micro Focus Book demo or AirPortDemo for examples in your instalation.

    regards, 

Children
No Data