IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need help on handling carriage control


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nileshyp

New User


Joined: 22 Jun 2005
Posts: 65
Location: Mumbai

PostPosted: Wed Dec 21, 2011 9:10 pm
Reply with quote

Hi,

I need one help on a Easytrieve program which gets exported in Excel sheet.
first record is getting a carriage control when imported into Excel.
Could some provide me an idea as to how to handle it in easytrieve program?

Thanks in advance
Neil
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Dec 21, 2011 9:34 pm
Reply with quote

I have read it several times, and still cannot understand your post.

You have some data which needs to go into Exel. You mention Easytrieve several times. You mention a carriage-control character.

Do you have report output from Easytrieve which has carriage control chacters and you want to know how to get rid of them before stuffing the file into Excel?
Back to top
View user's profile Send private message
nileshyp

New User


Joined: 22 Jun 2005
Posts: 65
Location: Mumbai

PostPosted: Wed Dec 21, 2011 9:48 pm
Reply with quote

Sorry... my mistake. You put it in a right way
I want to get rid of Carriage control character which is getting as below after the report gets exported in excel format It looks as below

1WEEKLY PROOF OF LOSS - REPORT #: AACTUBKM1

Code:

The output file definition is as below

PRINT-LINE-1       W 127 A                           
TITLE-LINE         W  44 A +                         
  VALUE 'WEEKLY PROOF OF LOSS - REPORT  #:  AACTUBKM1'
                                                     
WS-INTER-CHG-LINE  W   3 A VALUE '***'               
WS-SPACES          W 127 A VALUE ' '                 
FILE REPORT01 PRINTER FB(128 1280).                 


Please help.

Thanks & Regards,
Neil
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Dec 21, 2011 10:27 pm
Reply with quote

Just define the output as file instead of printer and Easytrieve won't put a carriage control character on it.
Back to top
View user's profile Send private message
nileshyp

New User


Joined: 22 Jun 2005
Posts: 65
Location: Mumbai

PostPosted: Wed Dec 21, 2011 10:43 pm
Reply with quote

Hi Craq,

I made below changes

Code:

 FILE REPORT01 FB(127 1270).           
 ***FILE REPORT01 PRINTER FB(128 1280).


And

Code:

*REPORT RPT1 PRINTER REPORT01 LINESIZE (127) PAGESIZE (32767) +
REPORT RPT1 FILE REPORT01 LINESIZE (127) PAGESIZE (32767) +   


and tried to compile it but compilation job abends with below errors

Code:

   662 *REPORT RPT1 PRINTER REPORT01 LINESIZE (127) PAGESIZE (32767) +         
   663 REPORT RPT1 FILE REPORT01 LINESIZE (127) PAGESIZE (32767) +             
   663 *******B054 NOT A VALID FILE - REPORT01                                 
           NOADJUST NOHEADING NODATE NOPAGE                                   
   664 CONTROL FINAL NOPRINT                                                   
   665 LINE 1  PRINT-LINE-1                                                   
OPTIONS FOR THIS RUN - ABEXIT SNAP  DEBUG (STATE FLDCHK NOXREF)  LINK (RX02C006
PRESIZE   512  SORT (DEVICE SYSDA  ALTSEQ NO  MSG DEFAULT  MEMORY MAX   WORK   
       *******A014 PREMATURE TERMINATION DUE TO PREVIOUS ERROR(S)             
******************************** BOTTOM OF DATA *******************************


Please help me to understand what is going wrong.

Regards,
Neil
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Dec 21, 2011 11:23 pm
Reply with quote

Hello,

At a glance, you have not completely changed from a "report" to a file. You need to make sure the file definition is correct for a file. The modified code contains pieces of both a report definition and a file. . .
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Dec 21, 2011 11:25 pm
Reply with quote

Follow on:

Having said that, you may want to consider passing the "report" and removing the carriage control. To generate a file rather than a report may require other changes the code.

If the report is small, a pass to remove the carriage control might not be so bad - if it is several million lines. . . . icon_neutral.gif
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Dec 22, 2011 12:51 am
Reply with quote

You are not using any characteristics of the REPORT.

You have formatted your own print line and are simply outputting that.

So, do it the most simple way. Having formatted your print line, replace the PRINT statement with PUT for a suitable filename and containing your formatted line.

If you were making use of the charecteristics of a report and didn't want the carriage control, I think you'd need a very simple "EXIT" file to avoid post-processing.
Back to top
View user's profile Send private message
nileshyp

New User


Joined: 22 Jun 2005
Posts: 65
Location: Mumbai

PostPosted: Thu Dec 22, 2011 9:40 am
Reply with quote

Hi,

I am still confuse on what is really needed above. Could someone give me exact definitions for the above?

Regards,
Neil
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Dec 22, 2011 11:18 am
Reply with quote

Hello,

If you cannot uderstand the change from a report to a file as suggested, you should just read the report you are creating (into a second step (possibly yoursortproduct)) and remove the carriage cotrol.

It is not reasonable to ask the forum to write your code for you .
Back to top
View user's profile Send private message
nileshyp

New User


Joined: 22 Jun 2005
Posts: 65
Location: Mumbai

PostPosted: Thu Dec 22, 2011 11:43 am
Reply with quote

Hi,

What I want to know is whether code mentioned below

FILE REPORT01 FB(127 1270).

and commented as below

***FILE REPORT01 PRINTER FB(128 1280)

and other declaration

REPORT RPT1 FILE REPORT01 LINESIZE (127) PAGESIZE (32767) +

instead of earlier declaration whioch is now commented below

*REPORT RPT1 PRINTER REPORT01 LINESIZE (127) PAGESIZE (32767) +

looks ok or the changes made by me are not valid?

Regards,
Nilesh
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Dec 22, 2011 1:39 pm
Reply with quote

Well, yes and no.

Your file definition looks fine for a PS/QSAM file.

Your repoert definition looks fine for using a PRINTER (Easytrieve definition) file.

A PS/QSAM file is not a PRINTER file.

A PRINT/REPORT/DISPLAY must go to a PRINTER file as far as I know.

There is no option that I know of to not produce the ASA contol codes.

Eitther PUT for your report title once and every 32767 lines, then PUT for each data line, or write a small report exit program in Cobol that writes to a PS/QSAM with no CCs or strip out the CCs afterwards or call CA and ask them to change Easytrieve for you.

EDIT:

An example PRINTER EXIT is now here.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Dec 22, 2011 3:27 pm
Reply with quote

Here is a snippet from one of my EZT jobs :

Code:

//SYSPR1   DD  UNIT=SYSDA,SPACE=(6144,(90,90))

FILE SYSPR1 PRINTER FB(205 6150)

PRINT PRINT4                                                         

REPORT PRINT4 PRINTER SYSPR1 LINESIZE 100 NOADJUST NODATE
SEQUENCE TRLAID27 TRLWSN27 TRLIAD27
TITLE 1 MEMBERN4 'OVERZICHT NIET-VERWERKTE FEEDBACK' +
'DATUM : ' -2 SYSDATE ' TIJD : ' -2 SYSTIME 
TITLE 3 MEMBERN4 PRMHFMONTH '   ' DATEHFYY
LINE MEMBERN4 TRLAID27 TRLWSN27 TRLOPN27 TRLIAD27 TRLIAT27 TRLEDU27 + 
TRLADU27

JOB INPUT(SYSPR1)                                                     
* remove here the print control characters
* and write the SYSPR1 records to another file
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts Help Control-R IBM Tools 2
No new posts Try to understand IMS control block IMS DB/DC 0
No new posts File Handling COBOL Programming 9
No new posts Control-M Delay All Other Mainframe Topics 0
Search our Forums:

Back to Top