×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

New COBOL version truncating 1st column of report output

New COBOL version truncating 1st column of report output

New COBOL version truncating 1st column of report output

(OP)
Migrating from "COBOL for MVS & VM" to "Enterprise COBOL for z/OS V3" Nothing changed in program, just recompiled.
Column 1 of report is truncated on output, how do I restore it?  
Output report file defined:
SELECT FLR-VOTES-UPDT-RPT-FILE  ASSIGN TO UT-S-UPDATE.
**************                              
 FD  FLR-VOTES-UPDT-RPT-FILE                
**************                              
     RECORD CONTAINS 133 CHARACTERS         
     RECORDING MODE F                       
     RECORD IS FLR-VOTES-UPDT-REPORT.  

 FLR-VOTES-UPDT-REPORT.                 
     FILLER                             PIC X(1).
     FLR-VOTES-UPDT-PRINT-LINE          PIC X(132).

Compiled with "NOADV" option, lines written to report with "AFTER" clause.

Output defined in JCL:
23 XXUPDATE   DD SYSOUT=&OUT,DCB=BLKSIZE=134           
   IEFC653I SUBSTITUTION JCL - SYSOUT=*,DCB=BLKSIZE=134

Output from UPDATE dd using load module compiled with MVS & VM COBOL:
FILE>      CONTROLM.PSIQ27CU.JOB02902
DATE: 12/10/2009          I N Q U I R
TIME: 16:02           COMMITTEE ACTIO
 MEASURE ID ACTN DATE COMM. HRNG SEQ.
 ---------- --------- ----- ---- ----

Output from UPDATE dd using load module compiled with Enterprise COBOL:
FILE>      CONTROLM.TSIQ27CU.JOB05223
ATE: 12/02/2009          I N Q U I R
IME: 21:47           COMMITTEE ACTION
MEASURE ID ACTN DATE COMM. HRNG SEQ.
---------- --------- ----- ---- ----
 

RE: New COBOL version truncating 1st column of report output

Why was NOADV chosen?

If the code uses ADVANCING, you want ADV i believe. . .

RE: New COBOL version truncating 1st column of report output

If you use ADVANCING, you must reserve the first byte for the control character.  BEFORE ADVANCING forces DCB=F[B]M, AFTER ADVANCING forces DCB=F[B]A.  If you use both, I don't know which prevails.

RE: New COBOL version truncating 1st column of report output

In either case (before/after), the first byte is needed for "printer  control". . .

From the Enterprise COBOL Manuals:

Quote:

ADV has meaning only if you use WRITE . . . ADVANCING in your source code. With ADV in effect, the compiler adds 1 byte to the record length to account for the printer control character. . .
.
Use NOADV if you already adjusted record length to include 1 byte for the printer control character.

Quote:

Usage note: If you use the ADV compiler option, the compiler adds 1 byte to the record length in order to allow for the control character. If in your record definition you already reserve the first byte for the control character, you should use the NOADV option.

RE: New COBOL version truncating 1st column of report output

The NOADV option says you have reserved the first byte for the control character.  As you have not, you want the compiler to add the byte, which requires the ADV option, as papadba suggests, or reserve the byte yourself.

RE: New COBOL version truncating 1st column of report output

You have reserved the first byte for carriage control.  That's what the FILLER of 1 byte is for.  If the code moves the filled out report line to the 01 entry (FLR-VOTES-UPDT-REPORT), then the first byte is in the FILLER and is used as a carriage control character.

You should move the filled out report line to the elementary field FLR-VOTES-UPDT-PRINT-LINE.

RE: New COBOL version truncating 1st column of report output

(OP)
As noted, I have set aside the first byte for carriage control, and I move the output line to FLR-VOTES-UPDT-PRINT-LINE before "WRITING" FLR-VOTES-UPDT-REPORT. This is unchanged since the switch in compilers. The bottom line, it appears to me that something has changed between COBOL FOR MVS/VM and Enterprise COBOL, that is causing the first char to be lopped off. Any pointers to a source that lists the differences between the two compilers would be gratefully appreciated. And, if I'm being dense here, and missing something, please point it out. THANKS!

RE: New COBOL version truncating 1st column of report output

As far as I remember, when we converted to Enterprise COBOL, we did not have any changes for writing report lines.  The code worked fine when recompiled.  I'm guessing there has to be something unorthodox happening in the code when you try to get the line printed.  In other words, a logic error.

RE: New COBOL version truncating 1st column of report output

As suggested, you should confirm the ADV/NOADV option is consistent between the compilers.  IIRC, your system programmer can set defaults for the installation and they may very well be different from previous defaults.  Confirm the options on the compile listing match between the old and new versions.

Regards,

Glenn

RE: New COBOL version truncating 1st column of report output

David,
A couple of questions:
Have you changed the JCL at all?
Have you moved operating systems? (your Cobol version has gone from MVS for VM to OS3)

I think that your program is fine, but your JCL should specify DCB=(RECFM=FBA,LRECL=134,BLKSIZE=27872).

Marc

RE: New COBOL version truncating 1st column of report output

You might try changing:
 //UPDATE   DD SYSOUT=&OUT,DCB=BLKSIZE=134
to:
 //UPDATE   DD SYSOUT=* (or &OUT - shouldn't matter for a test)

None of the sysout= statements on the systems i currently  support specify any dcb info at all . . .  fwiw.                        

RE: New COBOL version truncating 1st column of report output

It's been about ten years since I've been on the mainframe so be gentle smile

Didn't the RECFM have to be FBA in the JCL?

RE: New COBOL version truncating 1st column of report output

Hi David,

I've been viewing this thread on & off since the beginning.  Unfortunately I have no answers for you, but I have a few ques if you haven't yet left the building;

1) I noticed your "before" run shows the 3rd line truncated. Typo?  

2) Are you viewing the problem SYSOUT using the SDSF "S" line cmd?

3) Are you using cut & paste to display the code (both JCL & pgm)?

4) Could you also display the WRITE stmt?  

Thanx and

Regards, Jack.

"A problem well stated is a problem half solved" -- Charles F. Kettering
 

RE: New COBOL version truncating 1st column of report output

All,
I don't think it's worth replying to this thread any further as the poster appears to have not logged in since 14th December. The answer to this is, as stated in a number of posts above, is that his JCL is wrong. He needed to have FBA coded.

Marc

RE: New COBOL version truncating 1st column of report output

(OP)
Thank you all for your input - I appreciate your efforts. I haven't logged in for a while, due to many fires that have needed to be exinguished in our shop, which took precedence over the issue I originally posted. I will post a reply once I've tried your solutions.

Thanks!
David

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close