• Unstructured file create during run-time

    From Adam Kamal@21:1/5 to All on Thu Apr 7 13:56:40 2022
    Is this the correct syntax/values to create an EDIT file during runtime?
    It's still being created as Entery Sequence.

    ENTER TAL CREATE USING TAL-FILE-NAME,
    WS-FILE-PRIMARY-EXTENT,
    101,
    WS-FILE-SECONDARY-EXTENT,
    2,
    OMITTED,
    WS-FILE-BLOCK-LENGTH
    OMITTED
    OMITTED
    OMITTED
    WS-FILE-MAXEXTENTS
    OMITTED
    OMITTED.

    $ACCT.POST.POS00033 7 Apr 2022, 13:57
    ENSCRIBE
    TYPE E
    FORMAT 1
    EXT ( 4 PAGES, 20 PAGES )
    REC 375
    BLOCK 4096
    MAXEXTENTS 16
    OWNER 255,16
    SECURITY (RWEP): NNNN
    DATA MODIF: 7 Apr 2022, 13:46
    CREATION DATE: 7 Apr 2022, 13:46
    LAST OPEN: 7 Apr 2022, 13:46
    FILE LABEL: 150 (3.6% USED)
    EOF: 0 (0.0% USED)
    EXTENTS ALLOCATED: 0

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Keith Dick@21:1/5 to abol...@gmail.com on Fri Apr 8 00:23:47 2022
    On Thursday, April 7, 2022 at 1:56:42 PM UTC-7, abol...@gmail.com wrote:
    Is this the correct syntax/values to create an EDIT file during runtime? It's still being created as Entery Sequence.

    ENTER TAL CREATE USING TAL-FILE-NAME,
    WS-FILE-PRIMARY-EXTENT,
    101,
    WS-FILE-SECONDARY-EXTENT,
    2,
    OMITTED,
    WS-FILE-BLOCK-LENGTH
    OMITTED
    OMITTED
    OMITTED
    WS-FILE-MAXEXTENTS
    OMITTED
    OMITTED.

    $ACCT.POST.POS00033 7 Apr 2022, 13:57
    ENSCRIBE
    TYPE E
    FORMAT 1
    EXT ( 4 PAGES, 20 PAGES )
    REC 375
    BLOCK 4096
    MAXEXTENTS 16
    OWNER 255,16
    SECURITY (RWEP): NNNN
    DATA MODIF: 7 Apr 2022, 13:46
    CREATION DATE: 7 Apr 2022, 13:46
    LAST OPEN: 7 Apr 2022, 13:46
    FILE LABEL: 150 (3.6% USED)
    EOF: 0 (0.0% USED)
    EXTENTS ALLOCATED: 0

    The main mistake is that the "2" you are passing as the fifth argument is the file type number for Entry-sequenced. That value should be a 0 to specify an Unstructured file type. Unless you want to specify a non-default value for the maximum number of
    extents, you could stop the parameter list with that fifth argument. All arguments past the last one you include are treated as OMITTED. (The block length is not used for unstructured files.)

    The documentation says you should use the procedure FILE_CREATE_ instead of CREATE in new code, so it would be a tiny bit better for you to change to call FILE_CREATE_ instead, but it really doesn't matter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Adam Kamal@21:1/5 to rkd...@gmail.com on Fri Apr 8 10:02:13 2022
    On Friday, April 8, 2022 at 12:23:48 AM UTC-7, rkd...@gmail.com wrote:
    On Thursday, April 7, 2022 at 1:56:42 PM UTC-7, abol...@gmail.com wrote:
    Is this the correct syntax/values to create an EDIT file during runtime? It's still being created as Entery Sequence.

    ENTER TAL CREATE USING TAL-FILE-NAME,
    WS-FILE-PRIMARY-EXTENT,
    101,
    WS-FILE-SECONDARY-EXTENT,
    2,
    OMITTED,
    WS-FILE-BLOCK-LENGTH
    OMITTED
    OMITTED
    OMITTED
    WS-FILE-MAXEXTENTS
    OMITTED
    OMITTED.

    $ACCT.POST.POS00033 7 Apr 2022, 13:57
    ENSCRIBE
    TYPE E
    FORMAT 1
    EXT ( 4 PAGES, 20 PAGES )
    REC 375
    BLOCK 4096
    MAXEXTENTS 16
    OWNER 255,16
    SECURITY (RWEP): NNNN
    DATA MODIF: 7 Apr 2022, 13:46
    CREATION DATE: 7 Apr 2022, 13:46
    LAST OPEN: 7 Apr 2022, 13:46
    FILE LABEL: 150 (3.6% USED)
    EOF: 0 (0.0% USED)
    EXTENTS ALLOCATED: 0
    The main mistake is that the "2" you are passing as the fifth argument is the file type number for Entry-sequenced. That value should be a 0 to specify an Unstructured file type. Unless you want to specify a non-default value for the maximum number of
    extents, you could stop the parameter list with that fifth argument. All arguments past the last one you include are treated as OMITTED. (The block length is not used for unstructured files.)

    The documentation says you should use the procedure FILE_CREATE_ instead of CREATE in new code, so it would be a tiny bit better for you to change to call FILE_CREATE_ instead, but it really doesn't matter.
    Thank you very much, this fixed the issue.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Adam Kamal@21:1/5 to JShepherd on Fri Apr 8 10:02:36 2022
    On Friday, April 8, 2022 at 9:36:47 AM UTC-7, JShepherd wrote:
    In article <4fc8b501-5101-4bf5...@googlegroups.com>,
    abol...@gmail.com says...

    Is this the correct syntax/values to create an EDIT file during runtime? >It's still being created as Entery Sequence.

    ENTER TAL CREATE USING TAL-FILE-NAME,
    WS-FILE-PRIMARY-EXTENT,
    101,
    WS-FILE-SECONDARY-EXTENT,
    2,
    OMITTED,
    WS-FILE-BLOCK-LENGTH
    OMITTED
    OMITTED
    OMITTED
    WS-FILE-MAXEXTENTS
    OMITTED
    OMITTED.

    $ACCT.POST.POS00033 7 Apr 2022, 13:57
    ENSCRIBE
    TYPE E
    FORMAT 1
    EXT ( 4 PAGES, 20 PAGES )
    REC 375
    BLOCK 4096
    MAXEXTENTS 16
    OWNER 255,16
    SECURITY (RWEP): NNNN
    DATA MODIF: 7 Apr 2022, 13:46
    CREATION DATE: 7 Apr 2022, 13:46
    LAST OPEN: 7 Apr 2022, 13:46
    FILE LABEL: 150 (3.6% USED)
    EOF: 0 (0.0% USED)
    EXTENTS ALLOCATED: 0
    You have 2 in the file-type parameter, that is EntrySequenced
    file-type 0 is unstructured


    The Guardian Procedure Calls manual is here .. until they move it again

    https://support.hpe.com/hpesc/public/docDisplay? docLocale=en_US&docId=a00022744en_us


    manuals root page

    https://support.hpe.com/connect/s/product? language=en_US&tab=manualsAndGuides&kmpmoid=7792231#t=Documents
    Thanks for your help!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From JShepherd@21:1/5 to All on Fri Apr 8 16:36:45 2022
    In article <4fc8b501-5101-4bf5-805a-a4a3b0244905n@googlegroups.com>, abolkini@gmail.com says...

    Is this the correct syntax/values to create an EDIT file during runtime?
    It's still being created as Entery Sequence.

    ENTER TAL CREATE USING TAL-FILE-NAME,
    WS-FILE-PRIMARY-EXTENT,
    101,
    WS-FILE-SECONDARY-EXTENT,
    2,
    OMITTED,
    WS-FILE-BLOCK-LENGTH
    OMITTED
    OMITTED
    OMITTED
    WS-FILE-MAXEXTENTS
    OMITTED
    OMITTED.

    $ACCT.POST.POS00033 7 Apr 2022, 13:57
    ENSCRIBE
    TYPE E
    FORMAT 1
    EXT ( 4 PAGES, 20 PAGES )
    REC 375
    BLOCK 4096
    MAXEXTENTS 16
    OWNER 255,16
    SECURITY (RWEP): NNNN
    DATA MODIF: 7 Apr 2022, 13:46
    CREATION DATE: 7 Apr 2022, 13:46
    LAST OPEN: 7 Apr 2022, 13:46
    FILE LABEL: 150 (3.6% USED)
    EOF: 0 (0.0% USED)
    EXTENTS ALLOCATED: 0


    You have 2 in the file-type parameter, that is EntrySequenced
    file-type 0 is unstructured


    The Guardian Procedure Calls manual is here .. until they move it again

    https://support.hpe.com/hpesc/public/docDisplay? docLocale=en_US&docId=a00022744en_us


    manuals root page

    https://support.hpe.com/connect/s/product? language=en_US&tab=manualsAndGuides&kmpmoid=7792231#t=Documents

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Keith Dick@21:1/5 to JShepherd on Fri Apr 8 10:22:32 2022
    On Friday, April 8, 2022 at 9:36:47 AM UTC-7, JShepherd wrote:
    In article <4fc8b501-5101-4bf5...@googlegroups.com>,
    abol...@gmail.com says...

    Is this the correct syntax/values to create an EDIT file during runtime? >It's still being created as Entery Sequence.

    ENTER TAL CREATE USING TAL-FILE-NAME,
    WS-FILE-PRIMARY-EXTENT,
    101,
    WS-FILE-SECONDARY-EXTENT,
    2,
    OMITTED,
    WS-FILE-BLOCK-LENGTH
    OMITTED
    OMITTED
    OMITTED
    WS-FILE-MAXEXTENTS
    OMITTED
    OMITTED.

    $ACCT.POST.POS00033 7 Apr 2022, 13:57
    ENSCRIBE
    TYPE E
    FORMAT 1
    EXT ( 4 PAGES, 20 PAGES )
    REC 375
    BLOCK 4096
    MAXEXTENTS 16
    OWNER 255,16
    SECURITY (RWEP): NNNN
    DATA MODIF: 7 Apr 2022, 13:46
    CREATION DATE: 7 Apr 2022, 13:46
    LAST OPEN: 7 Apr 2022, 13:46
    FILE LABEL: 150 (3.6% USED)
    EOF: 0 (0.0% USED)
    EXTENTS ALLOCATED: 0
    You have 2 in the file-type parameter, that is EntrySequenced
    file-type 0 is unstructured


    The Guardian Procedure Calls manual is here .. until they move it again

    https://support.hpe.com/hpesc/public/docDisplay? docLocale=en_US&docId=a00022744en_us


    manuals root page

    https://support.hpe.com/connect/s/product? language=en_US&tab=manualsAndGuides&kmpmoid=7792231#t=Documents

    Rather than trying to use URLs that point into HPE's library, I always go in from the top:

    www.hpe.com/info/nonstop-docs

    From that page, click on the link for L-series or J-series, as appropriate, then enter keywords to search for the manual you are interested in. In the search results, click on the manual title to open the manual and you can read it in your web browser.

    For manuals I reference often, instead of bookmarking the manual's URL, I download the PDF to my computer -- when you open a manual, there is a button near the top of the window for downloading the manual.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bill Honaker@21:1/5 to Adam Kamal on Fri Apr 8 14:18:50 2022
    On Thu, 7 Apr 2022 13:56:40 -0700 (PDT), Adam Kamal <abolkini@gmail.com> wrote:

    Is this the correct syntax/values to create an EDIT file during runtime?
    It's still being created as Entery Sequence.

    ENTER TAL CREATE USING TAL-FILE-NAME,
    WS-FILE-PRIMARY-EXTENT,
    101,
    WS-FILE-SECONDARY-EXTENT,
    2,
    OMITTED,
    WS-FILE-BLOCK-LENGTH
    OMITTED
    OMITTED
    OMITTED
    WS-FILE-MAXEXTENTS
    OMITTED
    OMITTED.

    $ACCT.POST.POS00033 7 Apr 2022, 13:57
    ENSCRIBE
    TYPE E
    FORMAT 1
    EXT ( 4 PAGES, 20 PAGES )
    REC 375
    BLOCK 4096
    MAXEXTENTS 16
    OWNER 255,16
    SECURITY (RWEP): NNNN
    DATA MODIF: 7 Apr 2022, 13:46
    CREATION DATE: 7 Apr 2022, 13:46
    LAST OPEN: 7 Apr 2022, 13:46
    FILE LABEL: 150 (3.6% USED)
    EOF: 0 (0.0% USED)
    EXTENTS ALLOCATED: 0

    Hi, Adam,

    Keith and JShepherd's comments will create an Edit file correctly, albeit an empty one.

    If you then intend to open and write to it though, you can't just use FILE_OPEN_ and WRITEX calls. The resulting file will be declared corrupt by programs that try to riead it.

    You can find information in the IOEdit procedures which are used to write edit files in the Guardian Programmer's Guide,
    in the chapter labeled "Using the IOEdit Procedures'. Alternatively, since your code appears to be COBOL,
    you can use the standard COBOL verbs to Open (for Extend is preferred), WRITE and CLOSE.

    But it's probably usefult to use variable length records in those writes.

    Good luck!
    Bill

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)