Questions tagged [copybook]

Questions about library text as used in COBOL. This text is often used to define the structure and format of the data for records in a file. When the copybook is used as a source for a tool for data conversion, use a tag for the tool, if available; otherwise, use the 'cobol' tag and identify the tool by name. For other questions about the use or content of a copybook use the 'cobol' tag.

52 questions
0
votes
2 answers

String length in COBOL copybooks

I am working with a Java webservice hosted on Mainframe for which, we are generating copybook files. I have an XSD with a complextype containing string fields. I want to specify the length of the string field to 1024. Currently, it is generating an…
Sayak Banerjee
  • 1,954
  • 3
  • 25
  • 58
0
votes
1 answer

Write a Cobol copybook?

I'm using a copybook that needs records added to it.. Is it possible to move records to the copybook record and then write out the copybook in COBOL? If so, any references on how to do this? I have this code (based on the answer to this question),…
Meg
  • 91
  • 2
  • 12
0
votes
1 answer

Looking for an elegant way to convert a copy book in Swift in Java

I'm doing a conversion from a COBOL copybook to a SWIFT message. First I'm parsing the copybook with a copybookHelper class and then I write a giant set of if statements to test all the fields and populate my SWIFT string. Is there a less cumbersome…
-1
votes
1 answer

How i can manage iterations in WTX reading a copybook

I have a copybook with an array of 30 products that I need to map to a XML message and a field that content the number of iterations that have information, but if there are not the 50 products some iteration come empty. Actually I have a WTX map…
Monk
  • 1
-2
votes
1 answer

PL/I copybook to COBOL copybook

How to convert PL/I copybook to COBOL copybook. 2 PL_COPYBOOK. 3 FIRST_FIELD CHAR(20). 3 SECOND_FIELD FIXED(5). 3 THIRD_FIELD FIXED(9,0). 3 FOURTH_FIELD FIXED(7,1). 3 FIFTH_FIELD BIT(8). 3 SIXTH_FIELD FIXED BIN(15).
Mohit
  • 5
  • 1
-4
votes
1 answer

Redefines clause in cobol

i'm trying to re-define the a variable in Cobol working-storage. Please see if below id possible: Can I re-define a variable with PIC clause 9(2).9(3) to this PIC clause -(2).9(3)
Sunitha S
  • 1
  • 1
  • 3
-6
votes
1 answer

Need Java Code/Logic to extract COMP. field from EBCDIC file

Need java code or logic to unpack COBOL COMP. field from EBCDIC file. Please help I have tried the below code for unpacking comp. But some value i getting is in negative. Ex. 8188 we are getting as -57348 public static String getBinary(byte[]…
Rajesh
  • 69
  • 1
  • 6
1 2 3
4