-2

Actually am trying to create fixed length file which length is more than 32000,If not please help me to create How to create that.

please find below system message.

Cause . . . . . : The numeric value specified parameter RCDLEN, which is defined as type *INT2 in the command definition object, is not valid. The parameter types and their allowed values follow:

  • INT2: The range of values is -32768 to 32767.

  • INT4: The range of values is -2147483648 to 2147483647.

  • UINT2: The range of values is 0 to 65535.

  • UINT4: The range of values is 0 to 4294967295.

  • DEC: The range of values for this parameter is limited by its define length.

    It is defined with LEN(*N) in the command definition object.

    • -- *N: This error occurred in an expression with a numeric value with more than 15 significant digits.

++++++++++++++++++++++++++++++++++++++++++++++++

By default system will take *INT2 as numeric type(*INT2 range mentioned above). Am sure *INT2 maximum length is 32k.But we cant modify Numeric type as *UNT2,Let me know how to change *UNT2(range mentioned above) as Numeric type while creating the fixed length file.

Prawin
  • 11
  • 4
  • You probably cant a file with a record-length > 32k. Why would you want to ?? I would suggest breaking the record up into separate records and have a multi-record file. Arrays are a good choice why not have a record for each array element (if large enough. – Bruce Martin Oct 14 '15 at 06:59
  • You mention "*INT2" and "*UNT2" in your question, but those have no relationship to the RCDLEN() parameter when creating an undescribed file. Those are possible data types of individual columns of an externally-described table. Regardless, you can't create a physical table that has a fixed width of 32K or greater, period. (Rows can be much larger, just not fixed-length.) If you need an undescribed row width of that size, use a streamfile. Don't use an object that isn't appropriate. – user2338816 Oct 14 '15 at 08:01
  • This says no more than your previous question. Can you add any outstanding answers from the comments on your previous question into this question, please? @BruceMartin has outlined a good solution. You can access your data through a CALLed module, so your program "sees" the complete record, because the module puts multiple records together. 32K per record may not be appropriate, other lengths may be better (I don't know for iSeries). Look at the other hints in the comments. You *will not be able to do this directly as you want*. As you were told previously, and again here. – Bill Woodger Oct 14 '15 at 10:36
  • 1
    *Hello Techie Fellows Really Thank you for valuable comments.** I checked with IBM forum,we can able to create the file max length 32767. Kindly check in below link (http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_61/cl/crtpf.htm) .....Check for **RCDLEN** section in that above link. – Prawin Oct 15 '15 at 07:24
  • Since such a file can't be created, it follows that there's no way to put data into such a file. Much better answers would be possible if you simply told us what _business problem_ you're trying to solve. What function are you needing to create? What is your objective? What should the procedure **do**? – user2338816 Oct 20 '15 at 07:36

3 Answers3

0

32766 is the os limit on file length. IFS files have no limit.

danny117
  • 5,581
  • 1
  • 26
  • 35
  • By "file length" you mean record-length? Can you expand to include a short example of how to define an IFS file for a COBOL program? – Bill Woodger Oct 14 '15 at 13:50
  • I have no cobol mojo. {Create a buffer, fill buffer, process buffer} repeat. http://www.mysamplecode.com/2011/06/iseries-read-ifs-file-sample-rpgle-and.html – danny117 Oct 14 '15 at 15:37
  • Oh..Danny sorry to mention Actually am trying to create File in Cobol400 am not using RPGLE for creating file. – Prawin Oct 15 '15 at 06:26
  • I have no cobol mojo. :( – danny117 Oct 15 '15 at 13:20
0

Hello Techie Fellows Really Thank you for valuable comments.* I checked with IBM forum,we can able to create the file max length 32767. Kindly check in below link **(www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_61/cl/…) **.....Check for RCDLEN section in that above link.

Prawin
  • 11
  • 4
  • Can you fix the link please? Confirm that you have managed to create a record one byte longer than the maximum value written in the link you provided. Explain why you feel that is a success, given that we know you are looking for records about 64,000 bytes long. – Bill Woodger Oct 19 '15 at 09:20
0

You can use SQL to define a table that includes large objects. A CLOB field can be up to 2Gb for single byte CCSIDs or 1Gb for double byte CCSIDs. You can directly address the first 16Mb with a variable in RPG. I don't know what the longest COBOL variable is. If you need to exceed the max variable length, you can use locaters and substring out the value.

jmarkmurphy
  • 11,030
  • 31
  • 59