View previous topic :: View next topic
|
Author |
Message |
nanda31
New User
Joined: 30 Mar 2007 Posts: 8 Location: hyderabad
|
|
|
|
Hi, My requirement is to prefix zero to the records. File format is as shown below
5648972651
7203046685547550000
850903568004786
869009555008340
All records are of different length. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
What do you want the output to look like?
What is the lrecl and recfm? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
Please post the expectd output as well & if not SORT then what else can you use, let us know that. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
I have coded this with few assumptions. Change this as per your requirements.
Code: |
//DOIT EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=
//SORTOUT DD DSN=
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(5,5),RLSE),
// DCB=*.SORTIN
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1:C'0',2:1,80)
/*
|
Input:
Code: |
5648972651
7203046685547550000
850903568004786
869009555008340
|
output:
Code: |
05648972651
07203046685547550000
0850903568004786
0869009555008340
|
|
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
nandha,
Was my assumption correct? Else post as to how your output should look like and details of the LRECL and RECFM. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Aaru,
Quote: |
//DOIT EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=* |
Your solution uses DFSORT, whereas the SUBJECT LINE says 'syncsort'. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Murali,
Quote: |
Your solution uses DFSORT, whereas the SUBJECT LINE says 'syncsort'. |
I am getting WER messages and not ICE messages. Hence it is clear that i have used SYNCSORT and not DFSORT. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Aaru wrote: |
I am getting WER messages and not ICE messages. Hence it is clear that i have used SYNCSORT and not DFSORT. |
Aaru,
You've used ICEMAN, that is meant for DFSORT. If you code this on SyncSort sites this will be used as an alias of SYNCTOOL. And, yeah your code will work for SyncSort sites as well.
By the way, you didn't post your SYSOUT for us, so none of us know what were the SYSOUT messages viz. starting with WERxxx or ICExxx, so any one will assume the solution for DFSORT. It's just a thought, dont take it otherwise. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
You've used ICEMAN, that is meant for DFSORT. If you code this on SyncSort sites this will be used as an alias of SYNCTOOL. And, yeah your code will work for SyncSort sites as well. |
One correct statement out of three - not bad.
PGM=ICEMAN or PGM=SORT invokes the sort product at the site (DFSORT, Syncsort or CA-Sort). You can use PGM=ICEMAN for any of the sort products.
ICEMAN is NOT an alias of SYNCTOOL. (PGM=ICETOOL invokes DFSORT's ICETOOL or Syncsort's SYNCTOOL.) |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Quote: |
You've used ICEMAN, that is meant for DFSORT. If you code this on SyncSort sites this will be used as an alias of SYNCTOOL.
|
This is not correct. At sites using SyncSort, specifying PGM=ICEMAN is equivalent to specifying PGM=SORT or PGM=SYNCSORT, not SYNCTOOL. ICETOOL is the alias to SYNCTOOL. |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Sorry to reiterate what Frank posted - my screen had not refreshed and I did not see his response. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
I am personally sorry the nanda31 does not feel the need to follow through on his/her questions....
To post a question and not bother to respond or reply to questions is very poor behavior, so be it....four topics started and only two with any response? |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Quote: |
To post a question and not bother to respond or reply to questions is very poor behavior |
Even i felt the same and that is the reason for my second post on this topic.
Anyways thanks Frank and others for the details. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
I misread ICEMAN for ICETOOL, fault from my part...
If I try to correct my earlier statement, I think I can write:
Quote: |
You've used ICEMAN, that is meant for DFSORT. If you code this on SyncSort sites this will be used as an alias of SyncSort. And, yeah your code will work for SyncSort sites as well. |
Please advise. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
You've used ICEMAN, that is meant for DFSORT. |
While it's true that ICEMAN was originally "meant for DFSORT" (it was originally the DFSORT program name), it has been an alias for all of the sort products for many decades now. So there's no reason to think of PGM=ICEMAN as "meant for DFSORT" at this point. PGM=ICEMAN and PGM=SORT can be thought of as equivalent ways to invoke the sort product at the site. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Thanks for the clarifiaction Frank. Will keep these points for future references. |
|
Back to top |
|
|
|