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

How to move the fields from one position to another


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shitij

New User


Joined: 09 Sep 2005
Posts: 31
Location: Delhi

PostPosted: Fri Aug 18, 2006 6:11 pm
Reply with quote

Hi,

I have a task under which I need to move the fields in the file from one position to another,

say I have the following fields,

270.000
180.000
180.000
180.000
180.000
100.000
90.000
30.000


Now say I want to write these fields in another position in the following format:
00000000270000
00000000180000
00000000180000
00000000180000
00000000180000
00000000100000
00000000090000
00000000030000

I want to ask how can the program can know whether it is picking a 3 digit field or a 2 digit field or a 1 digit field?

How can a program check the fields dynamically?

If by any other method (like REXX or COBOL, which one would be more suitable), please reply.
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 Aug 18, 2006 10:16 pm
Reply with quote

I don't know which "program" you're asking about, but the following DFSORT job will create the output you show from the input you show:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB)
//SORTOUT DD DSN=...  output file (FB)
//SYSIN    DD    *
  OPTION COPY
  INREC FIELDS=(1,7,UFF,EDIT=(TTTTTTTTTTTTTT))
/*
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
No new posts parsing variable length/position data... DFSORT/ICETOOL 5
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
Search our Forums:

Back to Top