ok how would i do the following extract from a file i have
ssns = 267907230 which are in column 7 into a separate
data set then create a 2nd job step to extract from the
data set created the following "fund code" which is in
column 31 and is 113 into yet another data set



ok how would i do the following extract from a file i have ssns = 267907230 which are in column 7 ..

Answer / Bhole Nath Mishra

[{"qno": "70600","question": "To accomplish this, you can use a scripting language like Python or Perl to read the input file, extract the desired columns, and write the results to separate output files. Here's an example using Python:
```
# Read input file
with open("input.txt", "r") as f:n tssns = [line.split()[6] for line in f]n tfund_codes = []
# Write output files
with open("output1.txt", "w") as out1,n topen("output2.txt", "w") as out2:n tfor ssn in ssns:n t tout1.write(ssn +
)
t tss = [line.split()[31] for line in f if line.split()[7] == ssn][0]n t tout2.write(ss +
)
```"]

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Programming Languages AllOther Interview Questions

what is lazy loading in hibernate?Explain in detailed manner?

2 Answers   IBM, TCS,


Diff between %let and Call symput?

1 Answers   Accenture,


Programs in JAVA to get the remainder and quotient of given two numbers without using % and / operators?

2 Answers  


Q1.Write a C program which asks the user for a number between 1 to 9 and shows the  number. If the user inputs a number out of the specified range, the program should  show an error and prompt the user for a valid input.

1 Answers  


you have a computer with 80GB hard disk and ubuntu 8.04 is installed on entire hard disk.now you have to create a seprate partition for windows OS and install win XP as dual boot.write down the steps involved along with the commands

1 Answers   Anand Group, Indian Navy, TCS,


what is the difference between "types" and "data" in abap.

4 Answers   Tech Soft,


will it allow to add same value in HashMap class.

1 Answers  


Write a pseudo code to evaluate a number to any base given (2...16) based on the input. Number greater than 9 should be given as A-F for 10-15.

1 Answers   Goldman Sachs,


How to update a data for the views in the relational data base schema

1 Answers   TCS,


Please anyone tell me coding to print prime numbers from 1 to 5000 in c#....

2 Answers  


technical interview questions and process

0 Answers   Ariba,


Which tag is used to break a line

3 Answers  


Categories