View previous topic :: View next topic
|
Author |
Message |
sudhakarraju
New User
Joined: 05 May 2005 Posts: 31
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
If you mean, "Without using ISPF Edit", yes. If you mean, "Without opening the data set at all", no. |
|
Back to top |
|
|
sudhakarraju
New User
Joined: 05 May 2005 Posts: 31
|
|
|
|
I mean without using the ISPF Edit and in a batch mode. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
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 |
|
|
sudhakarraju
New User
Joined: 05 May 2005 Posts: 31
|
|
|
|
Thanks for your response "AKATSUKAMI'. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
sudhakarraju
New User
Joined: 05 May 2005 Posts: 31
|
|
|
|
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 |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
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 |
|
|
sudhakarraju
New User
Joined: 05 May 2005 Posts: 31
|
|
|
|
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 |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
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 |
|
|
sudhakarraju
New User
Joined: 05 May 2005 Posts: 31
|
|
|
|
Can you tell me how it can be done using DFSORT?
Thanks
Sudhakar Raju |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
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 |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
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 |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
After 8 years s/he should know the difference! Perhaps it is one of those shops that has both? |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Although having Synctool aliased to ICETOOL and invoking DFSORT seems rather improbable, to me at least. |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
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 |
|
|
sudhakarraju
New User
Joined: 05 May 2005 Posts: 31
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
sudhakarraju
New User
Joined: 05 May 2005 Posts: 31
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
sudhakarraju
New User
Joined: 05 May 2005 Posts: 31
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Wherever did such chopped-up source come from? |
|
Back to top |
|
|
sudhakarraju
New User
Joined: 05 May 2005 Posts: 31
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|