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
 

 

SYNCSORT - Prefixing zeros to the records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
nanda31

New User


Joined: 30 Mar 2007
Posts: 8
Location: hyderabad

PostPosted: Thu Sep 20, 2007 5:20 pm    Post subject: SYNCSORT - Prefixing zeros to the records
Reply with quote

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
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Sep 20, 2007 5:37 pm    Post subject:
Reply with quote

What do you want the output to look like?
What is the lrecl and recfm?
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Sep 20, 2007 5:39 pm    Post subject:
Reply with quote

Hi,

Please post the expectd output as well & if not SORT then what else can you use, let us know that.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Sep 20, 2007 6:21 pm    Post subject: Reply to: SYNCSORT - Prefixing zeros to the records
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Fri Sep 21, 2007 11:06 am    Post subject: Reply to: SYNCSORT - Prefixing zeros to the records
Reply with quote

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
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Fri Sep 21, 2007 12:22 pm    Post subject:
Reply with quote

Aaru,

Quote:
//DOIT EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*

Your solution uses DFSORT, whereas the SUBJECT LINE says 'syncsort'.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Fri Sep 21, 2007 12:47 pm    Post subject: Reply to: SYNCSORT - Prefixing zeros to the records
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Sep 21, 2007 7:20 pm    Post subject: Re: Reply to: SYNCSORT - Prefixing zeros to the records
Reply with quote

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. icon_smile.gif
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Sep 21, 2007 9:51 pm    Post subject:
Reply with quote

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. icon_rolleyes.gif

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
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Sat Sep 22, 2007 12:52 am    Post subject:
Reply with quote

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
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Sat Sep 22, 2007 12:54 am    Post subject:
Reply with quote

Sorry to reiterate what Frank posted - my screen had not refreshed and I did not see his response.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Sat Sep 22, 2007 3:26 am    Post subject:
Reply with quote

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? icon_rolleyes.gif
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Sun Sep 23, 2007 10:05 pm    Post subject: Reply to: SYNCSORT - Prefixing zeros to the records
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Sep 24, 2007 10:15 am    Post subject:
Reply with quote

Hi,

I misread ICEMAN for ICETOOL, fault from my part... icon_redface.gif

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
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Sep 24, 2007 8:59 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Sep 26, 2007 2:42 pm    Post subject:
Reply with quote

Thanks for the clarifiaction Frank. Will keep these points for future references.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


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