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

SYNCSORT - Prefixing zeros to the records


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 2146
Location: At my coffee table

PostPosted: Thu Sep 20, 2007 5:37 pm
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

Superior Member


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

PostPosted: Thu Sep 20, 2007 5:39 pm
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: 1287
Location: Chennai, India

PostPosted: Thu Sep 20, 2007 6:21 pm
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: 1287
Location: Chennai, India

PostPosted: Fri Sep 21, 2007 11:06 am
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: 1436
Location: Bangalore,India

PostPosted: Fri Sep 21, 2007 12:22 pm
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: 1287
Location: Chennai, India

PostPosted: Fri Sep 21, 2007 12:47 pm
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

Superior Member


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

PostPosted: Fri Sep 21, 2007 7:20 pm
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 Developer


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

PostPosted: Fri Sep 21, 2007 9:51 pm
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: 496
Location: USA

PostPosted: Sat Sep 22, 2007 12:52 am
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: 496
Location: USA

PostPosted: Sat Sep 22, 2007 12:54 am
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: 2146
Location: At my coffee table

PostPosted: Sat Sep 22, 2007 3:26 am
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: 1287
Location: Chennai, India

PostPosted: Sun Sep 23, 2007 10:05 pm
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

Superior Member


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

PostPosted: Mon Sep 24, 2007 10:15 am
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 Developer


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

PostPosted: Mon Sep 24, 2007 8:59 pm
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

Superior Member


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

PostPosted: Wed Sep 26, 2007 2:42 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
No new posts JCL sortcard to print only the records DFSORT/ICETOOL 11
Search our Forums:

Back to Top