Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Need help on handling carriage control

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: Need help on handling carriage control
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Dec 21, 2011 9:34 pm    Post subject: Reply to: Need help on handling carriage control
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    Post subject: Reply to: Need help on handling carriage control
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    Post subject:
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    Post subject: Reply to: Need help on handling carriage control
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

Site Director


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

PostPosted: Wed Dec 21, 2011 11:23 pm    Post subject:
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

Site Director


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

PostPosted: Wed Dec 21, 2011 11:25 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Thu Dec 22, 2011 12:51 am    Post subject: Reply to: Need help on handling carriage control
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    Post subject: Reply to: Need help on handling carriage control
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

Site Director


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

PostPosted: Thu Dec 22, 2011 11:18 am    Post subject:
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    Post subject: Reply to: Need help on handling carriage control
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Thu Dec 22, 2011 1:39 pm    Post subject: Reply to: Need help on handling carriage control
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Thu Dec 22, 2011 3:27 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Control-M manuals JPVRoff All Other Mainframe Topics 0 Fri May 20, 2016 11:15 am
No new posts ON ERROR handling soundarr PL/I & Assembler 2 Wed May 11, 2016 3:37 am
No new posts Exception Handling in Native Stored P... Mariraj DB2 1 Thu Feb 25, 2016 4:08 am
No new posts Which Control block has the DSNTYPE i... sudarshan.srivathsav PL/I & Assembler 4 Thu Jan 28, 2016 11:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us