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

reformat the text to fill lines


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sudhakarraju

New User


Joined: 05 May 2005
Posts: 31

PostPosted: Wed Aug 07, 2013 8:53 pm
Reply with quote

Data can be reformatted in a sequential dataset by using line command "TF".
Is there a way to achive this in a batch mode without opening the dataset in edit mode?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Aug 07, 2013 8:55 pm
Reply with quote

If you mean, "Without using ISPF Edit", yes. If you mean, "Without opening the data set at all", no.
Back to top
View user's profile Send private message
sudhakarraju

New User


Joined: 05 May 2005
Posts: 31

PostPosted: Wed Aug 07, 2013 8:56 pm
Reply with quote

I mean without using the ISPF Edit and in a batch mode.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Aug 07, 2013 9:08 pm
Reply with quote

Then as I say the answer is "yes". Sri Kolusu or one of the DFSORT mavens can tell you if and how this can be done through DFSORT/ICETOOL.
Back to top
View user's profile Send private message
sudhakarraju

New User


Joined: 05 May 2005
Posts: 31

PostPosted: Wed Aug 07, 2013 9:14 pm
Reply with quote

Thanks for your response "AKATSUKAMI'.
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 Aug 07, 2013 9:18 pm
Reply with quote

By TF you mean what? "Text Flow"?

Need some details of your file (RECFM, LRECL) and a sample input and expected output.
Back to top
View user's profile Send private message
sudhakarraju

New User


Joined: 05 May 2005
Posts: 31

PostPosted: Wed Aug 07, 2013 9:24 pm
Reply with quote

I have a 80 byte file and I need to change it to a 200 byte file with text wrapping.

I am using the below JCL

Code:
//COMB1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=ZXYC.AAAA.NBCS.DOC080.PVTCHS,DISP=SHR
//OUT1 DD DSN=ZXYC.AAAA.NBCS.DOX200.PVTCHS,
//            DISP=(,CATLG),
//            DCB=(LRECL=200,RECFM=FBA),
//            SPACE=(CYL,(500,500),RLSE),
//            UNIT=SYSDA
//TOOLIN DD *
  RESIZE FROM(IN1) TO(OUT1) TOLEN(200)
//*

But its giving me below error.
Code:
SYT000I  SYNCTOOL RELEASE 1.7.0 - COPYRIGHT 2008  SYNCSORT INC.
SYT001I  INITIAL PROCESSING MODE IS "STOP"
SYT002I  "TOOLIN" INTERFACE BEING USED

           RESIZE FROM(IN1) TO(OUT1) TOLEN(200)
SYT048E  STATEMENT DOES NOT BEGIN WITH A VALID OPERATOR
SYT030I  OPERATION COMPLETED WITH RETURN CODE 12

SYT015I  PROCESSING MODE CHANGED FROM "STOP" TO "SCAN" DUE TO OPERATION FAILURE

SYT004I  SYNCTOOL PROCESSING COMPLETED WITH RETURN CODE 12

Not sure if there are any other ways of achiving this?

Cheers
Sudhakar Raju

EDIT: Code'd
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Aug 07, 2013 9:31 pm
Reply with quote

Perhaps if you realised that you are using SyncTool and not ICETool and if you looked at your manual you would find your answer. Why do you think posting in DFSort will help with a SYNCSort problem?
Back to top
View user's profile Send private message
sudhakarraju

New User


Joined: 05 May 2005
Posts: 31

PostPosted: Wed Aug 07, 2013 9:46 pm
Reply with quote

When I posted my question, I didn't know how to do it.
I thought may be it can be done using DFSort.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Aug 07, 2013 9:50 pm
Reply with quote

sudhakarraju wrote:
When I posted my question, I didn't know how to do it.
I thought may be it can be done using DFSort.


It CAN be done using DFSORT , but you are using Syncsort which does not support the Resize Operator.
Back to top
View user's profile Send private message
sudhakarraju

New User


Joined: 05 May 2005
Posts: 31

PostPosted: Wed Aug 07, 2013 9:59 pm
Reply with quote

Can you tell me how it can be done using DFSORT?

Thanks
Sudhakar Raju
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Aug 07, 2013 10:40 pm
Reply with quote

sudhakarraju wrote:
Can you tell me how it can be done using DFSORT?

Thanks
Sudhakar Raju


What good is the solution when you cannot use? you need to use RESIZE operator with JFY and SQZ.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Aug 07, 2013 11:14 pm
Reply with quote

Sudhakar,

If you have not figured it out yet, you do not have DFSORT, you have another sort product- Syncsort. DFSORT and Syncsort are competitive sort products. Hence it does not really matter if you have a solution which works only with DFSORT.

Could you show some sample input records and expected output out of it? And please make sure you use "Code" tags while posting data/code.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Aug 07, 2013 11:21 pm
Reply with quote

After 8 years s/he should know the difference! Perhaps it is one of those shops that has both?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Aug 07, 2013 11:27 pm
Reply with quote

Although having Synctool aliased to ICETOOL and invoking DFSORT seems rather improbable, to me at least.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Wed Aug 07, 2013 11:40 pm
Reply with quote

From my understanding Synctool is directly compatible Icetool.

This is statement for statement.

If fact, when I inquired for a Synctool manual from the company, they referred me to the Icetool manual.

So while the SORT products may differ, the TOOL products are the same.
Back to top
View user's profile Send private message
sudhakarraju

New User


Joined: 05 May 2005
Posts: 31

PostPosted: Wed Aug 07, 2013 11:55 pm
Reply with quote

Here is an example, I have a dataset with LRECL20 and I have to create a dataset with LRECL80.

Code:


Input LRECL20

01 VALIN15.  15
   V15-RECORD-ID
   PIC 9(09).  15
   V15-RECORD-TYPE
   PIC 9(02) VALUE
   15.  15
   V15-SORT-GROUP
   PIC 9(03) VALUE
   0.

Output RECL80

01 VALIN15.
   15 V15-RECORD-ID              PIC 9(09).
   15 V15-RECORD-TYPE            PIC 9(02) VALUE 15.
   15 V15-SORT-GROUP             PIC 9(03) VALUE 0.
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 Aug 08, 2013 1:11 am
Reply with quote

Dave, whilst there is no SyncTool documentation, it does not mean that SyncSort has RESIZE.

sudhakarraju.

From your latest example:
Code:

  INREC BUILD=(1,14,80:X)


Would be sufficient. Has your requirement changed?
Back to top
View user's profile Send private message
sudhakarraju

New User


Joined: 05 May 2005
Posts: 31

PostPosted: Fri Aug 09, 2013 11:14 pm
Reply with quote

Thanks for your response bill.
The example suggested by you didnt work. Here is the output I got

Code:

01 VALIN15.  1
   V15-RECORD-
   PIC 9(09).
   V15-RECORD-
   PIC 9(02) V
   15.  15
   V15-SORT-GR
   PIC 9(03) V
   0.
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: Sat Aug 10, 2013 12:09 am
Reply with quote

Hello,

Is there some reason you did not post the complete JCL & control statements?

For someone to help, it will be best if you show us the complete job.
Back to top
View user's profile Send private message
sudhakarraju

New User


Joined: 05 May 2005
Posts: 31

PostPosted: Sat Aug 10, 2013 12:11 am
Reply with quote

Here is the JCL I used as it was suggested.

Code:

//XXXXS010  EXEC  PGM=SORT
//SORTIN   DD *
01 VALIN15.  15
   V15-RECORD-ID
   PIC 9(09).  15
   V15-RECORD-TYPE
   PIC 9(02) VALUE
   15.  15
   V15-SORT-GROUP
   PIC 9(03) VALUE
   0.
//*
//SYSMOUT  DD SYSOUT=*
//*
//SORTOUT  DD  SYSOUT=*
//SYSIN DD *
  SORT FIELDS=COPY
  INREC BUILD=(1,14,80:X)
/*
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: Sat Aug 10, 2013 12:46 am
Reply with quote

My response was sometwhat tongue-in-cheek. And I miscounted.

You don't really want to do anything like TF, it looks like. You've got a scrambled COBOL data definition. To turn scrambled COBOL into unscrambled COBOL is not so easy with SORT.

Why don't you use the editor? If you can't do that, please explain why. If you want suggestions, fully and accurately describe what it is that you want to do.
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: Mon Aug 12, 2013 2:25 am
Reply with quote

Hello,

Wherever did such chopped-up source come from?
Back to top
View user's profile Send private message
sudhakarraju

New User


Joined: 05 May 2005
Posts: 31

PostPosted: Mon Aug 12, 2013 10:56 pm
Reply with quote

I was just trying to give an example.

I am actually getting the data from HFS and the output dataset on the TSO is text wrapped. I was trying to find some some utility that I can use to reformat the file to the required LRECL.

Here is the Scenario
If I am getting the file from HFS as LRECL 500 with the text wrapped, is there a way to copy that to a different dataset that has LRECL 80 without loosing any text?
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: Mon Aug 12, 2013 11:22 pm
Reply with quote

Pretend you want 20-byte records. Pretend you input is 70-byte records (instead of 500).

Arrange to show good examples across a maxium of three input records, per example (one might do, if they are really just text) and then construct expeacted (20-byte) output for that input.
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 -> JCL & VSAM Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts How to Reformat a file using File Man... All Other Mainframe Topics 14
No new posts TEXT-TO-PDF Compuware & Other Tools 1
No new posts Reformat and relocate content DFSORT/ICETOOL 4
No new posts I need a 4 lines block where substrin... DFSORT/ICETOOL 12
No new posts Copy few lines from SYSOUT of 10 mill... All Other Mainframe Topics 5
Search our Forums:

Back to Top