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
 

 

Need help on SORT card?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
vinuk2009

New User


Joined: 30 Apr 2009
Posts: 19
Location: chennai

PostPosted: Sat Oct 02, 2010 12:59 pm    Post subject: Need help on SORT card?
Reply with quote

Hi,
I have a file with LRECL 300 and FB. it is a flat file. Presently in the 90th position sign (i.e. '-') is there for some records and some records are strated which don't have sign in 90th position. I need to insert space or '+' in 90th position for all the records which don't have '-' and the column shold strat in 91st position. same like this I need to do in 114 th position, 150th position in same file. Could some one please let me know is it possible using sort?
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Oct 02, 2010 8:03 pm    Post subject:
Reply with quote

Hello,

Post some sample input and the output you want from the sample input. These do not need to be full-length records, just enough to show your requirement. Post the rules needed to get from the nput to the output.

Mention the dsorg and lrecl of the files.
Back to top
View user's profile Send private message
vinuk2009

New User


Joined: 30 Apr 2009
Posts: 19
Location: chennai

PostPosted: Sun Oct 03, 2010 12:08 pm    Post subject: Reply to: Need help on SORT card?
Reply with quote

Hi Dick,

here is the example


Input file


Code:
90 91 92 ..........114 115 116 ....................150 151 153........... cols

1  0  0  .............-      1   0    ....................2      0    0   ...........
-   2  0  ............2      0   0    ....................-       1    0   ..........
3  0  0  .............-      2   0    ....................-       2    0  ...........

Ouptut file

Code:
90 91 92 93 .......114 115 116 117...............150 151 152 153..........

+   1  0  0    .......-       1   0         ...............+       2    0     0  ..........
-    2  0       ........+      2   0   0   ................-        1    0        ..........
+   3  0  0   ........-        2   0        ................-       2    0        ..........


DSORG = PS and LRECL =300 and RECFM = FB
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Sun Oct 03, 2010 12:48 pm    Post subject: Reply to: Need help on SORT card?
Reply with quote

please learn to use the tags ( code tag in this case )
they will keep the data You enter aligned and make things easier for people willing to help
and using the preview button before the submit one will let You see what Your post will look like

I edited Your post to let You see what it looks like,
please repost just the file part properly aligned and I will cleanup everything after that
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Sun Oct 03, 2010 1:37 pm    Post subject: Reply to: Need help on SORT card?
Reply with quote

follow on
I reformatted in a more ( IMHO ) readable fashion

Input file
Code:

0 0 0 0 ... 1 1 1 1 ... 1 1 1 1 .......... cols
9 9 9 9 ... 1 1 1 1 ... 5 5 5 5 .......... cols
0 1 2 3 ... 4 5 6 7 ... 0 1 3 4 .......... cols


1 0 0 . ... - 1 0 . ... 2 0 0 . .......... data
- 2 0 . ... 2 0 0 . ... - 1 0 . .......... data
3 0 0 . ... - 2 0 . ... - 2 0 . .......... data

Ouptut file

Code:

0 0 0 0 ... 1 1 1 1 ... 1 1 1 1 .......... cols
9 9 9 9 ... 1 1 1 1 ... 5 5 5 5 .......... cols
0 1 2 3 ... 4 5 6 7 ... 0 1 3 4 .......... cols


+ 1 0 0 ... - 1 0 B ... + 2 0 0 .......... data
- 2 0 B ... + 2 0 0 ... - 1 0 B .......... data
+ 3 0 0 ... - 2 0 B ... - 2 0 0 .......... data

do You realize that You will lose the previous content of columns 93,117,154 ?

unless You shift everiyhing and change the column accordingly
Back to top
View user's profile Send private message
vinuk2009

New User


Joined: 30 Apr 2009
Posts: 19
Location: chennai

PostPosted: Sun Oct 03, 2010 6:34 pm    Post subject:
Reply with quote

Hi Enrico,

Thank you for reformating my data. I tried to reformat before post. But I didn't get success. Going forward I will follow your suggestion.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Sun Oct 03, 2010 7:12 pm    Post subject: Reply to: Need help on SORT card?
Reply with quote

the best way to format correctly is to edit/build the post in an editor with a fixed font ( without using tabs )
and after that cut and paste into the forum reply box

I hope I reformatted correctly,

but You still have to answer the question about shifting or overlaying
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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